Cacti+Nagios应用详解(二)整合cacti与nagios安装部署
ndoutils是将Nagios的配置及监控信息存储到数据库里,NPC通过调用ndo所存储的数据来展现Nagios的信息。ndoutils需要用到mysql的mysql-lib及mysql-inc,因此需要安装mysql-devel。由于刚装系统的时候已经装过了.这个软件本节就不用安装. [root@cacti-qmail soft]# tar -zxvf ndoutils-1.4b9.tar.gz [root@cacti-qmail soft]# cd ndoutils-1.4b9 [root@cacti-qmail ndoutils-1.4b9]#./configure --with-mysql-inc=/usr/include/mysql --with-mysql-lib=/usr/lib/mysql --enable-mysql --with-ndo2db-user=nagios --with-ndo2db-group=nagios [root@cacti-qmail ndoutils-1.4b9]#make 编译完成后(不需要make install) [root@cacti-qmail ndoutils-1.4b9]# cd src/ [root@cacti-qmail src]# ll 总计 1624 -rw-r--r-- 1 1001 1001 22480 09-15 20:04 db.c -rw-r--r-- 1 root root 145468 03-02 01:54 dbhandlers-2x.o -rw-r--r-- 1 root root 145444 03-02 01:54 dbhandlers-3x.o -rw-r--r-- 1 1001 1001 169907 10-27 15:51 dbhandlers.c -rw-r--r-- 1 root root 37872 03-02 01:54 db.o -rwxr-xr-x 1 root root 31342 03-02 01:54 file2sock -rw-r--r-- 1 1001 1001 5421 10-27 16:08 file2sock.c -rw-r--r-- 1 1001 1001 11485 10-21 15:53 io.c -rw-r--r-- 1 root root 16432 03-02 01:54 io.o -rwxr-xr-x 1 root root 32602 03-02 01:54 log2ndo -rw-r--r-- 1 1001 1001 6780 10-27 16:08 log2ndo.c -rw-r--r-- 1 root root 4427 03-02 01:53 Makefile -rw-r--r-- 1 1001 1001 4336 09-15 20:04 Makefile.in -rwxr-xr-x 1 root root 224645 03-02 01:54 ndo2db-2x -rwxr-xr-x 1 root root 224629 03-02 01:54 ndo2db-3x -rw-r--r-- 1 1001 1001 57565 10-27 16:08 ndo2db.c -rwxr-xr-x 1 root root 120333 03-02 01:54 ndomod-2x.o -rwxr-xr-x 1 root root 128498 03-02 01:54 ndomod-3x.o -rw-r--r-- 1 1001 1001 136855 10-27 16:08 ndomod.c -rw-r--r-- 1 1001 1001 514 2007-01-08 protonum.c -rwxr-xr-x 1 root root 28503 03-02 01:54 sockdebug -rw-r--r-- 1 1001 1001 3418 10-27 16:08 sockdebug.c -rw-r--r-- 1 1001 1001 4623 2009-07-17 utils.c -rw-r--r-- 1 root root 8824 03-02 01:54 utils.o [root@cacti-qmail src]# cp ndomod-3x.o ndo2db-3x log2ndo file2sock /usr/bin/ [root@cacti-qmail src]# cd ../config [root@cacti-qmail config]# ll 总计 64 -rw------- 1 root root 439 03-02 01:53 misccommands.cfg -rw-r--r-- 1 1001 1001 427 09-07 04:51 misccommands.cfg.in -rw------- 1 root root 566 03-02 01:53 nagios.cfg -rw-r--r-- 1 1001 1001 522 09-07 04:51 nagios.cfg.in -rw------- 1 root root 4486 03-02 02:06 ndo2db.cfg -rw------- 1 root root 4493 03-02 01:53 ndo2db.cfg-sample -rw-r--r-- 1 1001 1001 4489 09-15 20:08 ndo2db.cfg-sample.in -rw------- 1 root root 5130 03-02 01:59 ndomod.cfg -rw------- 1 root root 5130 03-02 01:53 ndomod.cfg-sample -rw-r--r-- 1 1001 1001 5112 09-07 04:51 ndomod.cfg-sample.in [root@cacti-qmail config]#cp ndo2db.cfg-sample ndo2db.cfg [root@cacti-qmail config]#cp ndomod.cfg-sample ndomod.cfg [root@cacti-qmail config]#cp ndo2db.cfg ndomod.cfg /usr/local/nagios/etc/ [root@cacti-qmail config]#cd /usr/local/nagios/etc [root@cacti-qmail etc]# vi ndo2db.cfg URL:http://www.bianceng.cn/OS/Linux/201410/46045.htm (编辑:源码网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |