loki 集成报警通知

loki 是一个很不错的类似prometheus 的日志系统,我们也可以基于grafana 进行报警添加 
当然新版本也支持类似alertmanager 模式的报警(后期试用添加说明)

原理

将loki 数据添加为prometheus 格式的,然后基于prometheus 的模式进行报警(因为loki 支持prrometheus 格式的查询,同时是proxy模式的)

参考配置

  • loki 数据源

 

 

  • 添加dashboard

loki 查询 

 

 

  • 添加报警

 

 

说明

loki 也支持类似prometheus alertmanager 格式的报警,后边写一些文章

参考资料

https://grafana.com/docs/loki/latest/logql/ 
https://grafana.com/docs/loki/latest/overview/ 
https://grafana.com/docs/loki/latest/api/ 
https://grafana.com/docs/loki/latest/alerting/

posted on 2021-01-07 20:32  荣锋亮  阅读(1711)  评论(0编辑  收藏  举报

导航