Prometheus监控学习笔记之Prometheus 2.x版本的常用变化

 

最近用了prometheus 2.0 版本,感觉改变还是有点大,现将改变相关记录如下:

1、prometheus.yml文件配置修改后,要想重新加载,必须在启动的时候添加参数:

      --web.enable-lifecycle  

比如:

# nohup ./prometheus --web.enable-lifecycle --config.file=prometheus.yml &

 

2、报警规则和记录数据规则已经不在是  rules 文件格式,完全改成了yml格式

      prometheus 提供了命令工具将原来的文件直接转换为新的格式:

# ./promtool update rules alert.rules

 

具体参考官方文档

https://prometheus.io/docs/prometheus/latest/migration/

posted @ 2019-08-26 09:35  时光飞逝,逝者如斯  阅读(1163)  评论(0编辑  收藏  举报