Nagios plug-in Ndoutils installation configuration
Original address: http://www.cnblogs.com/caoguo/p/5022645.html
# Nagios Install ndoutils# installs ndoutils plugin [[email protected]~]# Yum install-y mysql-devel perl-dbd-Mysql[[email protected]~]# wget http://nchc.dl.sourceforge.net/project/nagios/ndoutils-2.x/ndoutils-2.0.0/ndoutils-2.0.0.tar.gz[email protected] src]# tar zxf ndoutils-2.0.0. tar.gz [[email protected] src]# CD ndoutils-2.0.0[email protected] ndoutils-2.0.0]#./configure--prefix=/usr/local/Nagios--with-ndo2db-user=nagios--with-ndo2db-group=Nagcmd[[email protected] ndoutils-2.0.0]# make &&Make Install[[email protected] ndoutils-2.0.0]# CP daemon-init/etc/init.d/Ndo2db[[email protected] ndoutils-2.0.0]# chmod755/etc/init.d/Ndo2db[[email protected] ndoutils-2.0.0]# CP config/ndo2db.cfg-sample/usr/local/nagios/etc/Ndo2db.cfg[[email protected] ndoutils-2.0.0]# CP config/ndomod.cfg-sample/usr/local/nagios/etc/Ndomod.cfg[[email protected] ndoutils-2.0.0]# Chown nagios.nagcmd/usr/local/nagios/etc/ndo*[email protected] ndoutils-2.0.0]# chmod664/usr/local/nagios/etc/ndo*# Set up database and data account [[email protected]~]# Mysql-uroot-penter Password:mysql>CREATE DATABASE Nagios;mysql> Create user [email protected] identified by'Nagios'; MySQL> Grant all on nagios.*to [email protected];mysql>Flush Privileges;mysql>quit# Import table structure [[email protected] ndoutils-2.0.0]# CD db/[email protected] db]#./installdb-u nagios-p nagios-h localhost-d nagios# ndo2db configuration data connection [[email protected]~]# cd/etc/nagios/[email protected] nagios]# VI ndo2db.cfgndo2db_user=Nagiosndo2db_group=Nagcmddb_name=Nagiosdb_user=Nagiosdb_pass=Nagios[[email protected]~]#/etc/init.d/ndo2db start# Nagios and ndoutils communication [[email protected] nagios]# VI nagios.cfgbroker_module=/USR/LOCAL/NAGIOS/BIN/NDOMOD.O config_file=/usr/local/nagios/etc/Ndomod.cfg[[email protected]~]#/etc/init.d/nagios Restart
#重启nagios, the Nagios log output should be as follows
#查看下数据库
When the data is stored in the data, OK, END!!!
Nagios plug-in Ndoutils installation configuration