Zabbix企业微信报警shell脚本
#!/bin/bash
####################Message == $2 ##########################
user=$1
corpid=ww0b466101c8acf616
SECRECT=5sZg2QdESpeLNEdbS6gQV8ofHbWkrRWPx9HAvCij7eM
agentid=1000002
ACCESS_TOKEN=`curl $uurl | awk -F'"' '{print $10}'`
curl -i -X POST -H "'Content-type':'application/json'" -d \
'{
"touser" : "'$user'",
"msgtype" : "text",
"agentid" : '$agentid',
"text" : {
"content" : "'"$2"'"
},
"safe":0
}' \
$aurl
Zabbix服务端配置