Comments (2)
groups:
name: node_alert
rules:
alert: 主机CPU告警
expr: node_load1 > 3
labels:
severity: warning
annotations:
description: "{{ $labels.instance }} CPU load占用过高" #告警信息
summary: "{{ $labels.instance }} CPU load占用过高已经恢复" #告警恢复信息
level: 3 #告警级别,告警级别定义 0 信息,1 警告,2 一般严重,3 严重,4 灾难
mobile: 15888888881,15888888882,15888888883 #告警发送目标手机号(需要设置电话和短信告警级别)
ddurl: "https://oapi.dingtalk.com/robot/send?access_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,https://oapi.dingtalk.com/robot/send?access_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" #支持添加多个钉钉告警,用,号分割即可,如果留空或者未填写,则默认发送到配置文件中填写的钉钉地址
上面的这个配置文件是prometheus的告警rules文件,里面主要配置下level和下面的电话告警的phonecalllevel相等即可
电话告警只需要在我的这个告警中心的配置文件(conf/app.conf)里面配置你们腾讯的接口参数和告警级别即可.
#电话接口key
phonecallappkey=c24bxxxxxxxxxxxxxxxxxx
#电话模版ID
phonecalltpl_id=29xxxxxx
#电话sdk app id
phonecallsdkappid=140xxxxxx
#电话告警级别(等于4就进行语音告警) 告警级别定义 0 信息,1 警告,2 一般严重,3 严重,4 灾难
phonecalllevel=4
#默认拨打号码
#defaultphone=
#未使用user.csv或者user.csv中的号码轮询结束备用号码
backupphone=151xxxxxxxx
注意上面的配置里面defaultphone配置和user.csv只能二选一,配置了defaultphone就会默认出现告警直接拨打defaultphone的号码
from prometheusalert.
groups: name: node_alert rules: alert: 主机CPU告警 expr: node_load1 > 3 labels: severity: warning annotations: description: "{{ $labels.instance }} CPU load占用过高" #告警信息 summary: "{{ $labels.instance }} CPU load占用过高已经恢复" #告警恢复信息 level: 3 #告警级别,告警级别定义 0 信息,1 警告,2 一般严重,3 严重,4 灾难 mobile: 15888888881,15888888882,15888888883 #告警发送目标手机号(需要设置电话和短信告警级别) ddurl: "https://oapi.dingtalk.com/robot/send?access_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,https://oapi.dingtalk.com/robot/send?access_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" #支持添加多个钉钉告警,用,号分割即可,如果留空或者未填写,则默认发送到配置文件中填写的钉钉地址
上面的这个配置文件是prometheus的告警rules文件,里面主要配置下level和下面的电话告警的phonecalllevel相等即可
电话告警只需要在我的这个告警中心的配置文件(conf/app.conf)里面配置你们腾讯的接口参数和告警级别即可.
#电话接口key phonecallappkey=c24bxxxxxxxxxxxxxxxxxx #电话模版ID phonecalltpl_id=29xxxxxx #电话sdk app id phonecallsdkappid=140xxxxxx #电话告警级别(等于4就进行语音告警) 告警级别定义 0 信息,1 警告,2 一般严重,3 严重,4 灾难 phonecalllevel=4 #默认拨打号码 #defaultphone= #未使用user.csv或者user.csv中的号码轮询结束备用号码 backupphone=151xxxxxxxx
注意上面的配置里面defaultphone配置和user.csv只能二选一,配置了defaultphone就会默认出现告警直接拨打defaultphone的号码
好的,多谢.
from prometheusalert.
Related Issues (20)
- 告警恢复后,提示的值都是告警发生时监控到的值,并非当前值 HOT 1
- 告警路由规则中的正则表达式没有检查机制
- 飞书V2告警中告警描述不显示 HOT 4
- 我想使用mysql存储,请问sql文件在哪? HOT 2
- 请问有arm64的镜像吗?如何构建? HOT 3
- 飞书机器人应用告警发不出 HOT 1
- 飞书机器人告警接口调用成功,但是实际上未发送到飞书群 HOT 1
- 企业微信应用自定义模版测试返回空白 HOT 1
- 请问该如何退出登录
- 使用mysql做存储,开启了告警记录,依然没有记录告警 HOT 4
- 告警恢复,飞书发送模板还是红色的 HOT 3
- 大佬告警记录查询,帮忙加个持续时间的字段可以吗? HOT 1
- 配置prometheus后,未见报警发送到钉钉 HOT 1
- 告警消息没有合并发送 HOT 1
- 点击告警测试后提示这个 - 飞书告警测试 HOT 2
- 钉钉加签功能不生效 HOT 3
- 【功能】从 Prom Labels 中获取主机组作为告警组 HOT 5
- 新版的Grafana怎么配置notification channels
- [dingdingSign] 配置文件已开启钉钉加签,钉钉机器人地址解析加签参数 secret 为空,将使用不加签的地址! HOT 12
- 钉钉怎么自定主题呢,不点击进去,能知道发什么告警。
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prometheusalert.