Skip to content

Instantly share code, notes, and snippets.

@Kuri-su
Created February 11, 2020 07:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kuri-su/dd1f1282ff1f422c896e23df8e2d40e2 to your computer and use it in GitHub Desktop.
Save Kuri-su/dd1f1282ff1f422c896e23df8e2d40e2 to your computer and use it in GitHub Desktop.
prometheus 配置文件

Prometheus Configuration file

Prometheus config 文件主要分为以下六个部分,

  • global
    • global 主要设置全局的变量, 例如 scrape interval (取数据 单次时间), scrape timeout (取数据请求的 timeout) 等的数据, 另外包括重新载入 rule 的时间.
  • rule_files
    • 规则列表
  • scrape_configs:
    • 采集配置, 此处支持 指定 url 采集(例如 static_configs:), 或者 服务发现采集 (service discovery 简称 sd, 例如 consul_sd_configs), 甚至从 文件发现和采集 ( file sd config),
  • alerting
    • 告警规则
  • remote_write && romote_read
    • 远程读和远程写
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment