Tutorial: Install NDOUtils

17,936 views

Published on

Tutorial: Install NDOUtils

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
17,936
On SlideShare
0
From Embeds
0
Number of Embeds
333
Actions
Shares
0
Downloads
155
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Tutorial: Install NDOUtils

  1. 1. Tutorial Install NDOUtils
  2. 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. 3. Tutorial: Install NDOUtils After installing Nagios go to http://www.nagios.org/download/addons and download the latest version of NDOUtils. 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. 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. 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. 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 &quot;nagios&quot;; 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. 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 &quot;nagios&quot;; 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. 8. Tutorial: Install NDOUtils
  9. 9. Tutorial: Install NDOUtils ..:: Filipe Batista - 2009 ::.. filipebatista.bitdoo.com

×