Push zabbix alarm through nail group chat robot
1. First, create a new dingding.sh script under the alertscripts directory on the zabbix server, as follows:
#! / bin/bash
Content=$2
Curl 'https://oapi.dingtalk.com/robot/send?access_token=XXXX'\
-H 'Content-Type: application/json'\
-d'
{"msgtype": "text"
"text": {
"content": "${Content}'"
}
}
}'
2. Test the script
Sh dingding.sh json testzabbix zabbixcontent
3. Configure nail alarm type in zabbix interface.
Nailing robot reference document address: https://open-doc.dingtalk.com/docs/doc.htm?spm=a219a.7629140.0.0.pfRNpv&treeId=257&articleId=105735&docType=1