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


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.


相关内容