zabbix之微信告警

[BEGIN] 2018/3/15 11:51:33
Last login: Thu Mar 15 09:05:29 2018 from 10.2.202.39



#不知alertscripts 目录存放在那,采用查找方式
[root@localhost ~]# find / -name alertscripts
find: ‘/run/user/42/gvfs’: Permission denied
/usr/lib/zabbix/alertscripts
#进入该目录
[root@localhost ~]# cd /usr/lib/zabbix/alertscripts
#下载脚本包
[root@localhost alertscripts]# wget https://dl.cactifans.com/tools/zabbix_weixin.x86_64.tar.gz
#解压脚本包
[root@localhost alertscripts]# tar zxvf zabbix_weixin.x86_64.tar.gz

[root@localhost alertscripts]# mv zabbix_weixin/weixin .
#给权限
[root@localhost alertscripts]# chmod a+x weixin
[root@localhost alertscripts]# mv zabbix_weixin/weixincfg.json /etc/
[root@localhost alertscripts]# rm -rf zxvf zabbix_weixin.x86_64.tar.gz
[root@localhost alertscripts]# rm -rf zabbix_weixin/
#编辑相关信息
[root@localhost alertscripts]# vim /etc/weixincfg.json 

#测试脚本是否可以正常发送
[root@localhost alertscripts]# /usr/lib/zabbix/alertscripts/weixin xhchen subject body
#同步时间服务器
[root@localhost alertscripts]# ntpdate 10.2.3.106
15 Mar 14:02:11 ntpdate[8727]: step time server 10.2.3.106 offset -28631.485972 sec
[root@localhost alertscripts]# date
Thu Mar 15 14:02:15 CST 2018

本文记录了,借张思德大神blog 写的操作步骤

原链接点击

猜你喜欢

转载自my.oschina.net/ch66880/blog/1635150