天天看点

prometheus的配置文件prometheus.yml参数详解

global    # 此片段指定的是prometheus的全局配置, 比如采集间隔,抓取超时时间等。

rule_files   # 此片段指定报警规则文件, prometheus根据这些规则信息,会推送报警信息到alertmanager中。

scrape_configs    # 此片段指定抓取配置,prometheus的数据采集通过此片段配置。

alerting    # 此片段指定报警配置, 这里主要是指定prometheus将报警规则推送到指定的alertmanager实例地址。

remote_write    # 指定后端的存储的写入api地址。

remote_read    # 指定后端的存储的读取api地址

scrape_interval  # 抓取间隔,默认继承global值。

scrape_timeout   # 抓取超时时间,默认继承global值。

evaluation_interval # 评估规则间隔

external_labels  # 外部一些标签设置

metric_path     # 抓取路径, 默认是/metrics

scheme # 指定采集使用的协议,http或者https。

params # 指定url参数。

basic_auth # 指定认证信息。

*_sd_configs # 指定服务发现配置

static_configs # 静态指定服务job。

relabel_config # relabel设置。
           

继续阅读