prometheus配置文件内容:
1 global: 2 # 默认情况下抓取目标的频率. 3 [ scrape_interval: <duration> | default = 1m ] 4 5 # 抓取超时时间. 6 [ scrape_timeout: <duration> | default = 10s ] 7 8 # 评估规则的频率. 9 [ evaluation_interval: <duration> | default = 1m ] 10 11 # 与外部系统通信时添加到任何时间序列或警报的标签 12 #(联合,远程存储,Alertma# nager). 13 external_labels: 14 [ <labelname>: <labelvalue> ... ] 15 16 # 规则文件指定了一个globs列表. 17 # 从所有匹配的文件中读取规则和警报. 18 rule_files: 19 [ - <filepath_glob> ... ] 20 21 # 抓取配置列表. 22 scrape_configs: 23 [ - <scrape_config> ... ] 24 25 # 警报指定与Alertmanager相关的设置. 26 alerting: 27 alert_relabel_configs: 28 [ - <relabel_config> ... ] 29 alertmanagers: 30 [ - <alertmanager_config> ... ] 31 32 # 与远程写入功能相关的设置. 33 remote_write: 34 [ - <remote_write> ... ] 35 36 # 与远程读取功能相关的设置. 37 remote_read: 38 [ - <remote_read> ... ]