Prometheus 配置文件详解

  • 官方文档:https://prometheus.io/docs/prometheus/latest/configuration/configuration/

指标说明

1、Prometheus以scrape_interval规则周期性从监控目标上收集数据,然后将数据存储到本地存储上。
2、scrape_interval可以设定全局也可以设定单个metrics。
3、Prometheus以evaluation_interval规则周期性对告警规则做计算,然后更新告警状态。
4、evaluation_interval只有设定在全局。

  • global:全局配置
  • alerting:告警配置
  • rule_files:告警规则
  • scrape_configs:配置数据源,称为target,每个target用job_name命名。又分为静态配置和服务发现
# 全局配置
global:
# 默认抓取周期,可用单位ms、smhdwy #设置每15s采集数据一次,默认1分钟
[ scrape_interval: <duration> | default = 1m ]
# 默认抓取超时
[ scrape_timeout: <duration> | default = 10s ]
# 估算规则的默认周期 # 每15秒计算一次规则。默认1分钟
[ evaluation_interval: <duration> | default = 1m ]
# 和外部系统(例如AlertManager)通信时为时间序列或者警情(Alert)强制添加的标签列表
external_labels:
[ <labelname>: <labelvalue> ... ] # 规则文件列表
rule_files:
[ - <filepath_glob> ... ] # 抓取配置列表
scrape_configs:
[ - <scrape_config> ... ] # Alertmanager相关配置
alerting:
alert_relabel_configs:
[ - <relabel_config> ... ]
alertmanagers:
[ - <alertmanager_config> ... ] # 远程读写特性相关的配置
remote_write:
[ - <remote_write> ... ]
remote_read:
[ - <remote_read> ... ]

Prometheus 配置文件详解的更多相关文章

  1. quartz配置文件详解

    quartz配置文件详解(转载)     quartz学习总结: 一.关于job:    用Quartz的行话讲,作业是一个执行任务的简单Java类.任务可以是任何Java代码.只需你实现org.qu ...

  2. WebConfig配置文件详解

    今天看到博客园一位朋友整理的一个WebConfig配置文件详解,觉得不错,转载一下: <?xml version="1.0"?> <!--注意: 除了手动编辑此文 ...

  3. tomcat配置文件详解

    Tomcat系列之服务器的安装与配置以及各组件详解   tomcat 配置文件详解

  4. ubuntu nginx 安装以及配置文件详解

    1.到nginx官网下载源码包.最好下载稳定版本,nginx官网http://www.nginx.org/ 2.安装nginx依赖包运行命令: sudo apt-get install libssl- ...

  5. Spring配置文件详解 – applicationContext.xml文件路径

    Spring配置文件详解 – applicationContext.xml文件路径 Java编程                 spring的配置文件applicationContext.xml的默 ...

  6. spring配置文件详解--真的蛮详细

    spring配置文件详解--真的蛮详细   转自: http://book.51cto.com/art/201004/193743.htm 此处详细的为我们讲解了spring2.5的实现原理,感觉非常 ...

  7. net-snmp配置文件详解

    net-snmp配置文件详解 net-snmp的配置文件是有一定的层次结构的,配置起来也很方便.网上找了很多资料,大概把这个配置文件的各个信息搞懂了一点.其实在net-snmp的EXAMPLE.con ...

  8. Rsyslog配置文件详解

    Rsyslog配置文件详解https://my.oschina.net/0757/blog/198329 # Save boot messages also to boot.log 启动的相关信息lo ...

  9. (原创)LAMP搭建之二:apache配置文件详解(中英文对照版)

    LAMP搭建之二:apache配置文件详解(中英文对照版) # This is the main Apache server configuration file. It contains the # ...

随机推荐

  1. 某安全设备未授权访问+任意文件下载0day

    具体是哪家就不说了,硬件盒子,主要检测病毒. payload如下: https://xxx.xxx.xxx.xxx/downTxtFile.php?filename=/etc/passwd 比较简单, ...

  2. 你的MES系统又失败了?正确的打开方式在这里

    都知道MES实施艰难,真正成功的很少:有人戏称:10个MES,7个失败.1个不死不活.1个伪成功,最后一个仍需努力. 导致MES实施失败的原因有很多,所谓“成功的MES是一样的,失败的MES各有各的失 ...

  3. Linux使用pt-archiver工具自动备份MySQL

    操作系统: CentOS 6.9 脚本语言: shell https://github.com/iscongyang/Practical/blob/master/shell-scripts/pt-ar ...

  4. frameset frame 页面空白

    <html style="background:#213039;"> <head> <title>网站后台管理中心</title> ...

  5. 【若泽大数据】玩转大数据之Spark零基础到实战

    https://www.bilibili.com/video/av29407581?p=1 若泽大数据官网 http://www.ruozedata.com/ tidb 系列三:有了sparkjdbc ...

  6. jq node.js bootstrap

    1.node.js 网址:https://nodejs.org/en/ 用来通过下载node.js 来引用里面的npm 来实现对外部项目的下载 1.安装nodejs 自带了npm npm instal ...

  7. 测试cnblog

    this prelkdfkdjfkljasdlkfjlkjlkjsdf this this code this this pre codeljkjkjkdjkdjkdjkjdkjdkdlajlkdjf ...

  8. adb命令操作蓝牙

    打开和关闭蓝牙BT adb root adb shell svc bluetooth enable adb shell svc bluetooth disable UI层 查询:adb shell s ...

  9. 20180610模拟赛T1——脱离地牢

    Description 在一个神秘的国度里,年轻的王子Paris与美丽的公主Helen在一起过着幸福的生活.他们都随身带有一块带磁性的阴阳魔法石,身居地狱的魔王Satan早就想着得到这两块石头了,只要 ...

  10. shell脚本如何判断文件大小

    转自:https://blog.csdn.net/lovegengxin/article/details/80762329 1 .ls -lls -l $filename | awk '{print ...