5
三分钟实现Prometheus电话短信邮件钉钉飞书企业微信报警
source link: https://blog.51cto.com/fighter/5656648
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
三分钟实现Prometheus电话短信邮件钉钉飞书企业微信报警
精选 原创Prometheus是现在企业用的比较多的开源监控系统,Prometheus电话短信报警更是运维不可缺少的报警渠道,Spug推送助手针对Prometheus内置好了报警模板,可以通过简单的配置就可以实现Prometheus电话、短信、邮件、钉钉、飞书、企业微信等报警。
1、打开推送助手官网push.spug.cc,选择Prometheus模板
推送助手官网 / 模板市场 / Prometheus模板 / 使用模版 / 配置模板对象
2、拷贝保存模板URL
配置完成推送对象后,拷贝模板URL
3、编辑alertmanager配置文件,修改默认的webhook_configs地址
$ vim /etc/alertmanager/alertmanager.yml
route:
group_by: ['alertname']
group_wait: 300s
group_interval: 10m
repeat_interval: 1h
receiver: 'web.hook'
receivers:
- name: 'web.hook'
webhook_configs:
- url: 'https://push.spug.cc/send/9q****Rg' //推送助手模板URL,请自行替换为自己的模板URL!
inhibit_rules:
- source_match:
severity: 'critical'
target_match:
severity: 'warning'
equal: ['alertname', 'dev', 'instance']
route:
group_by: ['alertname']
group_wait: 300s
group_interval: 10m
repeat_interval: 1h
receiver: 'web.hook'
receivers:
- name: 'web.hook'
webhook_configs:
- url: 'https://push.spug.cc/send/9q****Rg' //推送助手模板URL,请自行替换为自己的模板URL!
inhibit_rules:
- source_match:
severity: 'critical'
target_match:
severity: 'warning'
equal: ['alertname', 'dev', 'instance']
4、根据实际情况,重启alertmanaer服务
$ systemctl restart alertmanager
# 如果是docker部署请重启容器:
$ docker restart alertmanager
# 如果是docker部署请重启容器:
$ docker restart alertmanager
5、验证电话、短信、机器人报警
触发报警,验证报警发送推送助手平台 / 推送日志 也可以看到发送的历史消息。
6、关于Spug推送助手:
推送助手是一个集成了电话、短信、邮件、飞书、钉钉、微信、企业微信等多通道的消息推送平台。 用户只需要调用一个简单的URL,就可以完成多通道的消息推送。链接:push.spug.cc
更多资讯、视频: Spug社区
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK