NDOutils

The NDOUTILS addon is designed to store all configuration and event data from Nagios in a database. Storing information from Nagios in a database will allow for quicker retrieval and processing of that data and will help serve as a foundation for the development of a new PHP-based web interface in Nagios 3.0.

Prerequisites
MySQL must be installed. Having had nothing but grief getting DB::mysql to install with a source installation of MySQL 5.0x, the easiest thing to do was just install MySQL server via yum:

yum install mysql-server mysql-devel

That also took care of installing DB::mysql for Perl.

ndoutils Installation
Download the latest version of the NDOUTILS:

cd /extra/src
wget http://umn.dl.sourceforge.net/sourceforge/nagios/ndoutils-1.4b7.tar.gz
tar zxvf ndoutils-1.4b7.tar.gz
cd ndoutils-1.4b7

Configure and compile the code:

./configure
make

Database Initialization
Create a database and user in MySQL - the easiest way is to use phpMyAdmin to add a user named nagios and a database of the same name that the user has privileges on. Or, create the database manually:

mysql -u root -p
CREATE DATABASE nagios;
GRANT all privileges on nagios.* to nagios@"localhost" identified by 'passwrd';

Once that is done, run the DB installation script in the db/ subdirectory of the NDO distribution to create the necessary tables in the database:

cd /extra/src/ndoutils-1.4b7
cd db
./installdb

Install the NODMOD broker module
Copy the compiled broker module to your Nagios directory:

cp src/ndomod-2x.o /usr/local/nagios/bin/ndomod.o

Copy the sample NDOMOD config file to your Nagios installation after modifying it to suit your needs:

cp config/ndomod.cfg /usr/local/nagios/etc

Add a line to the main Nagios config file /usr/local/nagios/etc/nagios.cfg:

broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg

In order for the Nagios daemon to send information to the NDOMOD module, make sure you have a line in there that reads:

event_broker_options=-1

Installing the NDO2DB daemon
Copy the compiled NDO2DB daemon to your Nagios installation:

cp src/ndo2db-2x /usr/local/nagios/bin/ndo2db

Copy the sample NDO2DB config file to your Nagios installation after modifying it to suit your needs (i.e. the database settings):

cp config/ndo2db.cfg /usr/local/nagios/etc/

Start the daemon running (no init script yet)

/usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg

Recent Updates

  • 2 years 2 days ago
  • 2 years 2 days ago
  • 2 years 4 days ago
    php 8.x
  • 2 years 6 days ago
    10.6.7
  • 2 years 1 week ago
    Drop Centos 5/6 stuff