标签:选项 bin ken 状态 ever 技术 access 告警 oca
1、钉钉创建群
2、[root@localhost ~]# vim /etc/zabbix/zabbix_server.conf #
[root@localhost alertscripts]# vim token.sh
#!/bin/bash
to=$1
subject=$2
text=$3
curl ‘https://oapi.dingtalk.com/robot/send?access_token=b4d37016f622cc50f67e15d44aa83fc74f6990a1b4e4d84548edaef86b0cdbbe‘ \ #创建机器人时复制的token
-H ‘Content-Type: application/json‘ \
-d ‘
{"msgtype": "text",
"text": {
"content": "‘"$text"‘"
},
"at":{
"atMobiles":[
"‘"$1"‘"
],
"isAtAll":false
}
}‘
[root@localhost alertscripts]# chown zabbix.zabbix token.sh
[root@localhost alertscripts]# chmod +x token.sh
网页端配置
管理--->报警媒介类型--->类型先脚本
点添加
配置---->动作-->创建动作
测试,
标签:选项 bin ken 状态 ever 技术 access 告警 oca
原文地址:https://www.cnblogs.com/liujunjun/p/11823833.html