• 2020 年 01 月 08 日 • 监控分析,Prometheus



-h, --help Show context-sensitive help (also try --help-long and --help-man).


--version Show application version.



​ Prometheus configuration file path.



​ Address to listen on for UI, API, and telemetry.

#空闲连接的超时时间 Maximum duration before timing out read of the request, and closing idle connections.


--web.max-connections=512 Maximum number of simultaneous connections.

#可从外部访问Prometheus的URL(例如,如果Prometheus是通过反向代理提供的)。 用于生成返回到Prometheus本身的相对和绝对链接。 如果URL包含路径部分,它将被用作Prometheus服务的所有HTTP端点的前缀。 如果省略,则会自动派生相关的URL组件。

--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.

#内部路由的前缀。 默认为--web.external-url的路径。

--web.route-prefix=<path> Prefix for the internal routes of web endpoints. Defaults to path of --web.external-url.

#静态资源目录的路径,位于/ user

--web.user-assets=<path> Path to static asset directory, available at /user.


--web.enable-lifecycle Enable shutdown and reload via HTTP request.


--web.enable-admin-api Enable API endpoints for admin control actions.



​ Path to the console template directory, available at /consoles.



​ Path to the console library directory.

#Prometheus实例页面的文档标题"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'



​ Base path for metrics storage.

#将数据保留多长时间。 此标志已被弃用,请改用“ storage.tsdb.retention.time”。


​ [DEPRECATED] How long to retain samples in storage. This flag has been deprecated, use "storage.tsdb.retention.time" instead.



​ 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.

#可以为块存储的最大字节数。 支持的单位:KB,MB,GB,TB,PB。


​ [EXPERIMENTAL] Maximum number of bytes that can be stored for blocks. Units supported: KB, MB, GB, TB, PB. This flag is experimental and can be changed in future releases.


​ Do not create lockfile in data directory.



​ [EXPERIMENTAL] Allow overlapping blocks, which in turn enables vertical compaction and vertical query merge.

#压缩tsdb WAL


​ Compress the tsdb WAL.



​ How long to wait flushing sample on shutdown or config reload.

#在单个查询中通过远程读取接口返回的最大样本总数。 0表示没有限制。 对于流式响应类型,将忽略此限制。

​ 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表示没有限制。

​ Maximum number of concurrent remote read calls. 0 means no limit.

#用于流式传输远程读取响应类型的单个帧中的最大字节数。 请注意,客户端也可能会限制帧大小。 1MB为默认情况下由protobuf推荐

​ 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.

#容忍中断以恢复警报“ for”状态的最长时间。


​ Max time to tolerate prometheus outage for restoring "for" state of alert.

#警报和恢复的“ for”状态之间的最短持续时间。 仅对于配置的“ for”时间大于宽限期的警报,才保持此状态。


​ Minimum duration between alert and restored "for" state. This is maintained only for alerts with configured "for" time greater than grace period.



​ Minimum amount of time to wait before resending an alert to Alertmanager.



​ The capacity of the queue for pending Alertmanager notifications.



​ Timeout for sending alerts to Alertmanager.


--query.lookback-delta=5m The maximum lookback duration for retrieving metrics during expression evaluations.


--query.timeout=2m Maximum time a query may take before being aborted.



​ Maximum number of queries executed concurrently.

#单个查询可以加载到内存中的最大样本数。 请注意,如果查询尝试将更多的样本加载到内存中,则查询将失败,因此这也限制了查询可以返回的样本数。


​ 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.


--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]


返回文章列表 文章二维码 打赏