NDOUtils的安装
下载软件
#wget
http://www.centreon.com.cn/download/ndoutils-1.4b7.tar.gz
解压缩
#tar xzf ndoutils-1.4b7.tar.gz
#cd ndoutils-1.4b7
先创建个数据库,用来存放nagios的输出内容,名字叫nagios,也有的叫做ndo,在配置centreon时要灵活修改保持一致
mysql nagios < /root/centreon-2.0/www/install/createNDODB.sql
创建ndouser的数据库用户
mysql> grant Select , Insert , Update , Delete on nagios.* to ndouser@'%' identified by 'ndopassword';
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
配置并编译
#./configure && make
把生成的文件安装到指定位置去
cp config/ndomod.cfg /usr/local/nagios/etc
cp src/ndomod-3x.o /usr/local/nagios/bin/ndomod.o
cp src/ndo2db-3x /usr/local/nagios/bin/ndo2db
cp config/ndo2db.cfg /usr/local/nagios/etc
测试一下
/usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg
可以把下列脚本加入到/etc/rc.local文件中去,开机启动ndo
[ -f /usr/local/nagios/var/ndo.sock ] && rm -f /usr/local/nagios/var/ndo.sock
/usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg
本文转自 holy2009 51CTO博客,原文链接:http://blog.51cto.com/holy2010/335039