所需安装包
安装ndoutils
tar xzvf ndoutils-1.4b9.tar.gz
ls
cd ndoutils-1.4b9
ls
./configure
make
make install
更新配置文件
cd src/
ls
cp ndomod-3x.o ndo2db-3x file2sock log2ndo /usr/local/nagios/bin/
cd ../config
cp ndo2db.cfg-sample ndomod.cfg-sample /usr/local/nagios/etc/
cd /usr/local/nagios/etc/
ls
mv ndo2db.cfg-sample ndo2db.cfg
mv ndomod.cfg-sample ndomod.cfg
chmod 644 ndo2db.cfg
chown nagios.nagios *
cd ..
chown nagios.nagios bin/*
修改配置文件
1
2
3
4
|
cd
/soft tar
zxvf npc- 2.0 . 4 .tar.gz mv
npc / var /www/html/cacti/plugins/ vim
/ var /www/html/cacti/ include /config.php |
1
2
3
4
5
6
7
8
9
10
|
mysql use cacti; alter
table npc_eventhandlers add long_outputTEXT NOT NULL default '' after
output; alter
table npc_hostchecks add long_outputTEXT NOT NULL default '' after
output; alter
table npc_hoststatus add long_outputTEXT NOT NULL default '' after
output; alter
table npc_notifications add long_outputTEXT NOT NULL default '' after
output; alter
table npc_servicechecks add long_outputTEXT NOT NULL default '' after
output; alter
table npc_servicestatus add long_outputTEXT NOT NULL default '' after
output; alter
table npc_statehistory add long_outputTEXT NOT NULL default '' after
output; alter
table npc_systemcommands addlong_output TEXT NOT NULL default '' after
output; |
1
2
|
service
ndo2db restart service
nagios restart |