prometheus

usage: prometheus [<flags>]

The Prometheus monitoring server  普罗米修斯监控服务器

Flags:
  -h, --help                     Show context-sensitive help (also try --help-long and --help-man). 显示帮助信息
      --version                  Show application version. 显示版本信息
      --config.file="prometheus.yml"
                                 Prometheus configuration file path. 普罗米修斯配置文件路径
      --web.listen-address="0.0.0.0:9090"
                                 Address to listen on for UI, API, and telemetry. 指定监听地址以及端口
      --web.config.file=""       [EXPERIMENTAL] Path to configuration file that can enable TLS or authentication. [实验]可启用TLS或身份验证的配置文件的路径。
      --web.read-timeout=5m      Maximum duration before timing out read of the request, and closing idle connections. 请求超时时间
      --web.max-connections=512  Maximum number of simultaneous connections. 并发连接数
      --web.external-url=<URL>   The URL under which Prometheus is externally reachable (for example, if Prometheus is served via a reverse proxy). Used for
                                 generating relative and absolute links back to Prometheus itself. If the URL has a path portion, it will be used to prefix
                                 all HTTP endpoints served by Prometheus. If omitted, relevant URL components will be derived automatically.

                                 Prometheus外部可访问的URL(例如,如果Prometheus是通过反向代理服务的)。用于生成相对和绝对链接回普罗米修斯本身。如果URL有一个路径部分,那么它将用于为Prometheus服务的所有HTTP端点加前缀。如果省略,相关的URL组件将自动派生。

      --web.route-prefix=<path>  Prefix for the internal routes of web endpoints. Defaults to path of --web.external-url. web端点的内部路由的前缀。默认路径为--web.external-url。
      --web.user-assets=<path>   Path to static asset directory, available at /user. 静态资产目录的路径,位于/user。
      --web.enable-lifecycle     Enable shutdown and reload via HTTP request. 通过HTTP请求启用关闭和重新加载。
      --web.enable-admin-api     Enable API endpoints for admin control actions.  为管理控制操作启用API终结点。
      --web.console.templates="consoles"
                                 Path to the console template directory, available at /consoles.  控制台模板目录的路径,位于/consoles。
      --web.console.libraries="console_libraries"
                                 Path to the console library directory. 控制台库目录的路径。
      --web.page-title="Prometheus Time Series Collection and Processing Server"
                                 Document title of Prometheus instance. 普罗米修斯实例的文档标题。
      --web.cors.origin=".*"     Regex for CORS origin. It is fully anchored. Example: 'https?://(domain1|domain2)\.com'
      --storage.tsdb.path="data/"
                                 Base path for metrics storage. 度量存储的基本路径。
      --storage.tsdb.retention=STORAGE.TSDB.RETENTION
                                 [DEPRECATED] How long to retain samples in storage. This flag has been deprecated, use "storage.tsdb.retention.time"
                                 instead. [已弃用]样品的保存时间。此标志已被弃用,请改用“storage.tsdb.retention.time”。
      --storage.tsdb.retention.time=STORAGE.TSDB.RETENTION.TIME
                                 How long to retain samples in storage. When this flag is set it overrides "storage.tsdb.retention". If neither this flag
                                 nor "storage.tsdb.retention" nor "storage.tsdb.retention.size" is set, the retention time defaults to 15d. Units Supported:
                                 y, w, d, h, m, s, ms.  样品保存多长时间。设置此标志时,它将覆盖“storage.tsdb.retention”。如果未设置此标志或“storage.tsdb.retention”或“storage.tsdb.retention.size”,则保留时间默认为15d。支持的单位:y、w、d、h、m、s、ms。
      --storage.tsdb.retention.size=STORAGE.TSDB.RETENTION.SIZE
                                 [EXPERIMENTAL] Maximum number of bytes that can be stored for blocks. A unit is required, supported units: B, KB, MB, GB,
                                 TB, PB, EB. Ex: "512MB". This flag is experimental and can be changed in future releases. [实验性]可以为块存储的最大字节数。需要单位,支持单位:B、KB、MB、GB、TB、PB、EB。例如:“512MB”。这个标志是实验性的,可以在将来的版本中更改。
      ---lockfile
                                 Do not create lockfile in data directory. 不要在数据目录中创建锁文件。
      --storage.tsdb.allow-overlapping-blocks
                                 [EXPERIMENTAL] Allow overlapping blocks, which in turn enables vertical compaction and vertical query merge. [实验性]允许重叠块,从而实现垂直压缩和垂直查询合并。
      --storage.tsdb.wal-compression
                                 Compress the tsdb WAL. 压缩tsdb WAL。
      --storage.remote.flush-deadline=<duration>
                                 How long to wait flushing sample on shutdown or config reload. 关闭或配置重新加载时等待刷新样本的时间。
      --storage.remote.read-sample-limit=5e7
                                 Maximum overall number of samples to return via the remote read interface, in a single query. 0 means no limit. This limit
                                 is ignored for streamed response types. 单个查询中通过远程读取接口返回的最大样本总数。0表示没有限制。对于流响应类型,此限制将被忽略。
      --storage.remote.read-concurrent-limit=10
                                 Maximum number of concurrent remote read calls. 0 means no limit. 并发远程读取调用的最大数目。0表示没有限制。
      --storage.remote.read-max-bytes-in-frame=1048576
                                 Maximum number of bytes in a single frame for streaming remote read response types before marshalling. Note that client
                                 might have limit on frame size as well. 1MB as recommended by protobuf by default. 在编组之前,单个帧中用于流式远程读取响应类型的最大字节数。请注意,客户端可能对帧大小也有限制。protobuf默认推荐1MB。
      --storage.exemplars.exemplars-limit=100000
                                 [EXPERIMENTAL] Maximum number of exemplars to store in in-memory exemplar storage total. 0 disables the exemplar storage.
                                 This flag is effective only with --enable-feature=exemplar-storage. [实验]要存储在内存中的最大示例数示例存储总数。0禁用示例存储。此标志仅在--enable feature=examplar存储时有效。
      --rules.alert.for-outage-tolerance=1h
                                 Max time to tolerate prometheus outage for restoring "for" state of alert. 允许普罗米修斯停机以恢复“for”警报状态的最长时间。
      --rules.alert.for-grace-period=10m
                                 Minimum duration between alert and restored "for" state. This is maintained only for alerts with configured "for" time
                                 greater than grace period. 警报和恢复“for”状态之间的最短持续时间。这仅适用于配置的“for”时间大于宽限期的警报。
      --rules.alert.resend-delay=1m
                                 Minimum amount of time to wait before resending an alert to Alertmanager. 向Alertmanager重新发送警报之前等待的最短时间。
      --alertmanager.notification-queue-capacity=10000
                                 The capacity of the queue for pending Alertmanager notifications. 等待Alertmanager通知的队列容量。
      --query.lookback-delta=5m  The maximum lookback duration for retrieving metrics during expression evaluations and federation. 在表达式求值和联合期间检索度量的最大回溯持续时间。
      --query.timeout=2m         Maximum time a query may take before being aborted. 中止查询前可能需要的最长时间。
      --query.max-concurrency=20
                                 Maximum number of queries executed concurrently. 并发执行的最大查询数。
      --query.max-samples=50000000
                                 Maximum number of samples a single query can load into memory. Note that queries will fail if they try to load more samples
                                 than this into memory, so this also limits the number of samples a query can return. 单个查询可以加载到内存中的最大样本数。请注意,如果查询尝试将更多的样本加载到内存中,则查询将失败,因此这也限制了查询可以返回的样本数。
      --enable-feature= ...      Comma separated feature names to enable. Valid options: promql-at-modifier, promql-negative-offset, remote-write-receiver,
                                 exemplar-storage, expand-external-labels. See https://prometheus.io/docs/prometheus/latest/disabled_features/ for more
                                 details.要启用的以逗号分隔的功能名称。有效选项:promql at修饰符、promql负偏移量、远程写入接收器、示例存储、扩展外部标签。看到了吗https://prometheus.io/docs/prometheus/latest/disabled_features/ 更多细节。
      --log.level=info           Only log messages with the given severity or above. One of: [debug, info, warn, error] 仅记录具有给定严重性或更高级别的消息。其中之一:[调试,信息,警告,错误]
      --log.format=logfmt        Output format of log messages. One of: [logfmt, json] 日志消息的输出格式。其中之一:[logfmt,json]

promtool

usage: promtool [<flags>] <command> [<args> ...]

Tooling for the Prometheus monitoring system. 普罗米修斯监控系统的工具。

Flags:
  -h, --help     Show context-sensitive help (also try --help-long and --help-man). 显示帮助信息
      --version  Show application version. 显示版本信息

Commands:
  help [<command>...]
    Show help. 显示帮助

  check config <config-files>...
    Check if the config files are valid or not. 检查配置文件是否有效。

  check web-config <web-config-files>...
    Check if the web config files are valid or not. 检查web配置文件是否有效。

  check rules <rule-files>...
    Check if the rule files are valid or not. 检查规则文件是否有效。

  check metrics
    Pass Prometheus metrics over stdin to lint them for consistency and correctness.通过标准输入传递普罗米修斯的度量,以使它们保持一致性和正确性。

    examples:

    $ cat metrics.prom | promtool check metrics

    $ curl -s http://localhost:9090/metrics | promtool check metrics

  query instant [<flags>] <server> <expr>
    Run instant query. 运行即时查询。

  query range [<flags>] <server> <expr>
    Run range query. 运行范围查询。

  query series --match=MATCH [<flags>] <server>
    Run series query. 运行序列查询。

  query labels [<flags>] <server> <name>
    Run labels query. 运行标签查询。

  debug pprof <server>
    Fetch profiling debug information. 获取分析调试信息。

  debug metrics <server>
    Fetch metrics debug information. 获取度量调试信息。

  debug all <server>
    Fetch all debug information. 获取所有调试信息。

  test rules <test-rule-file>...
    Unit tests for rules. 规则的单元测试。

  tsdb bench write [<flags>] [<file>]
    Run a write performance benchmark. 运行写性能基准。

  tsdb analyze [<flags>] [<db path>] [<block id>]
    Analyze churn, label pair cardinality. 分析客户流失,标签对基数。

  tsdb list [<flags>] [<db path>]
    List tsdb blocks. 列出tsdb块。

  tsdb dump [<flags>] [<db path>]
    Dump samples from a TSDB. 从TSDB转储样本。

  tsdb create-blocks-from openmetrics <input file> [<output directory>]
    Import samples from OpenMetrics input and produce TSDB blocks. Please refer to the storage docs for more details. 从OpenMetrics输入导入样本并生成TSDB块。更多详情请参考存储文档。
    

  tsdb create-blocks-from rules --start=START [<flags>] <rule-files>...
    Create blocks of data for new recording rules. 为新的记录规则创建数据块。