prometheus配置

1.全部配置 global

scrape_interval :15s #拉取targets的默认时间间隔;

evaluation_interval : 15s #执行rules的时间间隔;

2.告警配置 alerting

3.规则配置 rule_files

rule_files:

  - "rules.yml"

4.数据拉取配置 scrape_configs (serviceDiscoveryConfig主要用于target发现,大体分为两类,静态配置和动态发现) 

scrape_configs:

  - job_name:'prometheus'

    static_configs:  #静态服务发现

     - target:['localhost:9090']

5.远程可写存储 remote_write

6.远程可读存储 remote_read

越努力,越幸运!!! good good study,day day up!!!
原文地址:https://www.cnblogs.com/canglongdao/p/12048225.html