集成yowsup、Zabbix与Request Tracker
1. 集成yowsup与Zabbix
1.1 创建脚本
要将Zabbix与WhatsApp网关集成,首先需要创建一个合适的脚本,使用正确的 sudo 命令通过命令行调用。脚本应放置在 AlertScript 指定的位置,可以通过以下命令获取该位置:
grep AlertScript /etc/zabbix/zabbix_server.conf
输出结果可能如下:
### Option: AlertScriptsPath
# AlertScriptsPath=${datadir}/zabbix/alertscripts
AlertScriptsPath=/usr/lib/zabbix/alertscripts
然后,在 /usr/lib/zabbix/alertscripts 目录下创建一个名为 whatsapp.sh 的脚本,内容如下:
#!/bin/bash
BASEDIR=/home/yowsup/yowsup-master
sudo -u yowsup $BASEDIR/yowsup-cli demos -c $BASEDIR/yowsup.config -s $1 "$2 $3"
集成Yowsup、Zabbix与RT的方法
超级会员免费看
订阅专栏 解锁全文
4354

被折叠的 条评论
为什么被折叠?



