Explore information related to ndoutils db model

Install NDOUtils in Ubuntu - Do it now

This article covers how to install NDOUtils in Ubuntu. NDOUtils is basically the Database Output for Nagios Core. 

NDOUtils stands for Nagios Data Output Utilities which is an addon that allows you to move status and event information from Nagios to a MySQL Database for later retrieval and processing.


NDOUtils consists of the following parts:

1. The NDOMOD event broker module. This module is intended to be loaded by the Nagios process at runtime. Its only role is to dump all events and data from Nagios to a TCP socket or a regular file or Unix domain socket on the local filesystem somewhere. If you want Realtime transfer of data to MySQL, dump the data to a TCP or Unix domain socket. If you want delayed transfer of data into MySQL (i.e. you need to transfer the data to another host first), dump the data to a regular file.


2. The NDO2DB daemon. This standalone daemon reads input (that was produced by the NDOMOD broker module) from a TCP or Unix domain socket, parses that data, and then dumps it into one or more MySQL databases. The daemon is capable of handling multiple client connections simultaneously, so you can have multiple instances of the NDOMOD module writing to the same TCP or Unix domain socket at the same time.


3. The FILE2SOCK utility. This simple utility reads data from a standard file and dumps it to either a TCP or a Unix domain socket. This is useful if you are having the NDOMOD module write to a standard file that you later want to send to the NDO2DB daemon. If the module and the daemon are running on different machines, you can periodically use SSH to transfer the file from the monitoring machine to the machine running the NDO2DB daemon, and then use the FILE2SOCK utility to send the contents of that file to the TCP socket or Unix domain socket that the NDO2DB daemon is reading.


4. The LOG2NDO utility. This utility is used for importing historical log archives from NetSaint and Nagios and sending them to the NDO2DB daemon. It takes a single log file as its input and can output data to either a TCP socket, a Unix domain socket or standard output.


To compile the NDO broker module, NDO2DB daemon, and additional utilities:

1. Run the commands below;

./configure

make all

2. If the configure script is unable to locate your MySQL development libraries, you may need to help it out by using the --with-mysql-lib option. 

Here's an example:

./configure --with-mysql-lib=/usr/lib/mysql


NDOUTILS Tuning Kernel Parameters includes:

NDOUTILS uses a single message queue to communicate between the broker module and the NDO2DB daemon. Depending on the operating system, there may be parameters that need to be tuned in order for this communication to work correctly.

1. kernel.msgmax is the maximum size of a single message in a message queue

2. kernel.msgmni is the maximum number of messages allowed in any one message queue

3. kernel.msgmnb is the total number of bytes allow in all messages in any one message queue


How to initialize the Database for NDOUtils installation:

Before you start using NDOUtils, you should create the database where you will be storing all Nagios related information.

Note: Only MySQL Databases are supported!

i. Create a database for storing the data (e.g. nagios)

ii. Create a username/password that has at least the following privileges for the database:

SELECT, INSERT, UPDATE, DELETE

iii. Run the DB installation script in the db/ subdirectory of the NDO distribution to create the necessary tables in the database.

cd db

./installdb

iv. Make sure the database name, prefix, and username/password you just created and setup match the variable specified in the NDO2DB config file.

Read More



Install NDOUtils in CentOS RHEL and fix related error

This article covers how to install NDOUtils in CentOS. NDOUtils is an addon for Nagios Core that allows you to export current and historical data from one or more Nagios Core instances to a MySQL database. NDOUtils is included with Nagios XI. A source in Nagios Network Analyzer is the data collector. Outside of Nagios Network Analyzer a source is the location where data is originating from.


NDOUtils uses the kernel message queue for transferring the data from Nagios to NDOUtils. We are going to increase the default values the Kernel boots with to ensure it operates optimally.

1. Downloading NDOUtils Source

cd /tmp

wget -O ndoutils.tar.gz https://github.com/NagiosEnterprises/ndoutils/releases/download/ndoutils-2.1.3/ndoutils-2.1.3.tar.gz

tar xzf ndoutils.tar.gz

2. Compile NDOUtils

cd /tmp/ndoutils-2.1.3/

./configure

make all

3. Install Binaries

This step installs the binary files.

make install

4. Initialize Database

This prepares the database for NDOUtils.

cd db/

./installdb -u 'ndoutils' -p 'ndoutils_password' -h 'localhost' -d nagios

cd .. 

Read More