热门推荐:带字头像姐妹头像霸气头像伤感头像小清新长发头像超拽头像森系头像微信头像闺蜜头像扣扣头像
猜你喜欢:男生网名女生网名超拽网名霸气网名唯美网名搞笑网名微信名字励志网名古风网名文艺网名带符号网名非主流网名小清新网名幸福网名
Q友地带 > 日志 > 情感 > 【msn机器人】zabbix下实现MSN机器人报警(1) msn机器人

【msn机器人】zabbix下实现MSN机器人报警(1) msn机器人

归属:情感 来源:https://www.qzby.com 时间:2017-05-09

专辑:

zabbix下实现MSN机器人报警的具体步骤如下!
首先下载phpmsnclass_1.9z,下载地址为:http://code.google.com/p/phpmsnclass/downloads/list
使用如下方法进行安装
1. Create some folders like:
mkdir /var/spool/msnbot
mkdir /var/spool/msnbot/log
mkdir /var/spool/msnbot/spool
2. Change the attribute for spool folder:
chmod 777 /var/spool/msnbot/spool
chmod o+t /var/spool/msnbot/spool
3. Put msnbot.php, config.php and msn.class.php to /var/spool/msnbot/, and make msnbot.php executable:
chmod +x /var/spool/msnbot/msnbot.php
4. change the setting in config.php
5. Use msnbot.sh as your startup script to execute msnbot after system boot.
6. Change processMsg function in msnbot.php to do whatever you want.
7. If you need to send message to someone, just create a file under /var/spool/msnbot/spool, the filename like ‘*.msn’,
and the format like test.msn, first line is TO: email1,email2, and the other lines is the message.
After create the file, just change the attribute to 0666, then msnbot will try to send it.
NOTICE: file encoding should be UTF-8 if included non-English word.
注:完成上述安装后,一定要记得设置config.php,我的设置如下:

1.进入zabbix的WEB管理页面,在’管理’—’告警方式类型’,新建一个告警方式类型,描述栏填写’MSN’,类型栏选择’脚本’,Script name栏填写’sendmsn.php’.单击保存按钮.
2.进入zabbix的WEB管理页面,在’管理’—’用户’,选择一个用户,设置告警方式为’MSN’,在send to栏中设置接收报警的msn帐号,点击保存.
3.创建相应的动作,当触发事件后,发送报警到相应的zabbix用户.
4.登录您的linux监控服务器,进入到zabbix的安装目录下的bin目录下.新建一个sendmsn.php文件,编写调用phpmsnclass功能发送msn报警的程序.

5.最后,在监控服务器上使用命令登录MSN,OK,全部完成,赶紧去测试一下吧
1[root@localhost ~]# sh /var/spool/msnbot/msnbot.sh start
安装上面的方法,我们可以在zabbix下实现MSN机器人报警!希望对你们有用!
关于我们版权声明
网站地图
Copyright © 2013-2021 Qzby.Com - Q友地带