tutorial: install ndoutils

Download Tutorial: Install NDOUtils

If you can't read please download the document

Upload: filipe-batista

Post on 21-May-2015

15.962 views

Category:

Self Improvement


0 download

DESCRIPTION

Tutorial: Install NDOUtils

TRANSCRIPT

  • 1. Tutorial Install NDOUtils

2. Tutorial: Install NDOUtils If you have many hosts in Nagios, you may want to manipulate the generated data in other applications. The best way to do this is to store the Nagios data into a database. NDOUtils allows you to export current and historical data from one or more Nagios instances to a MySQL database. 3. Tutorial: Install NDOUtils After installing Nagios go to http://www.nagios.org/download/addonsand download the latest version ofNDOUtils. Make sure you have MySQL installed. If you haven't installed yet, type: [ [email_address]~]$yum install mysql mysql-server mysql-server And define your MySQL root password [ [email_address]~]$/usr/bin/mysqladmin -u root password 'new-password' 4. Tutorial: Install NDOUtils Extract the NDOUtils tarball. [ [email_address]~]$ tar xvzf ndoutils-1.4x.tar.gz After this compile and install. [ [email_address]~]$ cd ndoutils-1.4x [ [email_address] ndoutils-1.4x ]$ ./configure --prefix=/usr/local/nagios/ --enable-mysql --disable-pgsql --with-ndo2db-user=nagios with-ndo2db-group=nagcmd [ [email_address] ndoutils-1.4x ]$make 5. Tutorial: Install NDOUtils [ [email_address] ndoutils-1.4x ]$ cd src [ [email_address] src ]$ cp ndomod-3x.o ndo2db-3x file2sock log2ndo /usr/local/nagios/bin [ [email_address]~]$ cd ndoutils-1.4x [ [email_address] ndoutils-1.4x ]$ ./configure --prefix=/usr/local/nagios/ --enable-mysql --disable-pgsql --with-ndo2db-user=nagios with-ndo2db-group=nagcmd [ [email_address] ndoutils-1.4x ]$make Since there is no make install you'll have to copy manually some files. Inside the decompress folder of NDOUtils type: Also copy the sample NDOUtils config files. [ [email_address] ndoutils-1.4x ]$ cd config [ [email_address] src ]$ cp ndo2db.cfg ndomod.cfg/usr/local/nagios/etc Change the file permissions of the binaries chmod 774 /usr/local/nagios/bin/ndo* chown nagios:nagcmd /usr/local/nagios/bin/ndo* 6. Tutorial: Install NDOUtils [ [email_address] ndoutils-1.4x ]$ cd src [ [email_address] src ]$ cp ndomod-3x.o ndo2db-3x file2sock log2ndo /usr/local/nagios/bin Now we need to create the MySQL database and initialize. [ [email_address] ndoutils-1.4x ]$ cd config [ [email_address] src ]$ cp ndo2db.cfg ndomod.cfg/usr/local/nagios/etc [ [email_address] ndoutils-1.4x ]mysql -u root -p mysql>create database nagios; mysql>GRANT ALL ON nagios.* TO nagios@localhost IDENTIFIED BY "nagios"; mysql>exit [ [email_address] ndoutils-1.4x ]mysql -u nagios -p nagios < db/mysql.sql Edit the nagios.cfg (/usr/local/nagios/etc/nagios.cfg) and add the following line: Now we need to create the MySQL database and initialize. broker_module=/usr/local/nagios/bin/ndomod-3x.o config_file=/usr/local/nagios/etc/ndomod.cfg Also make sure you have the following line: event_broker_options=-1 7. Tutorial: Install NDOUtils Edit the ndomod.cfg and ndo2db.cfg config files (/usr/local/nagios/etc) with the proper settings (database name, prefix, username, password). After this start the NDO2DB daemon. [ [email_address] ndoutils-1.4x ]mysql -u root -p mysql>create database nagios; mysql>GRANT ALL ON nagios.* TO nagios@localhost IDENTIFIED BY "nagios"; mysql>exit [ [email_address] ndoutils-1.4x ]mysql -u nagios -p nagios < db/mysql.sql /usr/local/nagios/bin/ndo2db-3x -c /usr/local/nagios/etc/ndo2db.cfg 8. Tutorial: Install NDOUtils 9. Tutorial: Install NDOUtils ..:: Filipe Batista - 2009 ::.. filipebatista.bitdoo.com