zabbix配置钉钉告警

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env bash

tpo=$1
suject=$2
text=$3
curl -i -x POST https://oapi.dingtalk.com/robot/send?access_token=474458dfd054bf80afdfeed6afbd4390c9ba0b872786176ff94d404a0ab805bd -H 'Content-Type: application/json' \
-d '
{
"msgtype": "text",
"text": {
"content":" '监控报警:' '"$text"'"
},
"at":{
"atMobiles":[
"$1"
],
"isAtAll": false
}
}'