NDOUtils - Installing NDOUtils
NDOUtils - Installing NDOUtils
NCPA (19) NDOUtils 2.1.3 is what this guide instructs you to install, however future versions should also work fine with these steps.
NDOUtils (4)
Note: This guide is based on Nagios Core being installed using the following KB article:
Documentation (2)
Documentation - Installing Nagios Core From Source
Installation (1)
You should always install the latest version of NDOUtils as Nagios Core will not start if an incompatible version is used. The most re
NDOUtils - Installing NDOUtils
Troubleshooting (1)
NRDP (16)
Nagios XI includes NDOUtils and hence you should NOT follow this documentation.
NRDS (9)
NRPE (47)
Oracle Linux
Ubuntu
Debian
Raspbian
Fedora
Arch Linux
Gentoo
FreeBSD
Solaris
Apple OS X
===== CentOS 5.x / 6.x | RHEL 5.x / 6.x | Oracle Linux 5.x / 6.x =====
cd /tmp
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
rpm -ivh mysql-community-release-el7-5.noarch.rpm
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 1/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
yum update
yum install -y mysql mysql-server mysql-devel perl-DBD-MySQL
Before configuring MySQL / MariaDB you must start the service and configure it to boot on startup.
===== CentOS 5.x / 6.x | RHEL 5.x / 6.x | Oracle Linux 5.x / 6.x =====
Now to define the password for the root account in MySQL / MariaDB.
The password being defined is 'mypassword' and will be used in future commands (we suggest you use a more secure password
The 'single quotes' are used to define the boundaries of the password, this is extremely important when the password contains a
Password Note:
In future commands you will see the password is provided using the -p argument like follows:
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 2/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
mysql -u root -p'mypassword'
NOTE: It's very important to NOT put a space between the -p and the 'mypassword'.
Create Database
There will also be a dedicated user account called ndoutils with the password ndoutils_password (we suggest you use a mo
The storage location of the database will be the default location that MySQL / MariaDB uses, this can be changed however it is not
This command will connect to the local MySQL / MariaDB database engine interface.
Now execute these four commands (press Enter after each command):
Now you can exit the local MySQL / MariaDB database engine interface.
\q
Run this command to ensure that the database has been created:
Database
information_schema
nagios
test
NDOUtils uses the kernel message queue for transferring the data from Nagios to NDOUtils. We are going to increase the default v
cp /etc/sysctl.conf /etc/sysctl.conf_backup
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 131072000
kernel.msgmax = 131072000
kernel.shmmax = 4294967295
kernel.shmall = 268435456
There is no need to reboot the system, the last command ensured the new settings are active in the kernel.
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 3/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
cd /tmp
wget -O ndoutils.tar.gz https://github.com/NagiosEnterprises/ndoutils/releases/download/ndoutils-2.1.
tar xzf ndoutils.tar.gz
Compile NDOUtils
cd /tmp/ndoutils-2.1.3/
./configure
make all
Install Binaries
make install
Initialize Database
cd db/
./installdb -u 'ndoutils' -p 'ndoutils_password' -h 'localhost' -d nagios
cd ..
That first line of output that says failed: Table 'nagios.nagios_dbversion' doesn't exist is expected, it's testing t
This installs the config files as well as configuring the MySQL / MariaDB credentials so NDOUtils can connect to the database.
/usr/local/nagios/etc/ndo2db.cfg
db_user=ndoutils
db_pass=ndoutils_password
You should make sure the username and password are correct.
/usr/local/nagios/etc/ndomod.cfg
Using the default username and password the following commands install the configuration files and make the required changes.
make install-config
mv /usr/local/nagios/etc/ndo2db.cfg-sample /usr/local/nagios/etc/ndo2db.cfg
sed -i 's/^db_user=.*/db_user=ndoutils/g' /usr/local/nagios/etc/ndo2db.cfg
sed -i 's/^db_pass=.*/db_pass=ndoutils_password/g' /usr/local/nagios/etc/ndo2db.cfg
mv /usr/local/nagios/etc/ndomod.cfg-sample /usr/local/nagios/etc/ndomod.cfg
This installs the service or daemon files and configure them to start on boot.
===== CentOS 5.x / 6.x | RHEL 5.x / 6.x | Oracle Linux 5.x / 6.x =====
make install-init
make install-init
systemctl enable ndo2db.service
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 4/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
Different Linux distributions have different methods of starting the ndo2db service.
start ndo2db
Now you need to tell Nagios to use the NDO broker module. This is as simple as adding the following line to the nagios.cfg file:
broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg
The following commands will add that line as well as an extra line that explains what the module is for.
Restart Nagios
Now you need to restart Nagios to use the NDO broker module. Different Linux distributions have different methods of restarting N
===== CentOS 5.x / 6.x | RHEL 5.x / 6.x | Oracle Linux 5.x / 6.x =====
===== CentOS 5.x / 6.x | RHEL 5.x / 6.x | Oracle Linux 5.x / 6.x =====
This command will show Nagios successfully loaded the NDO module:
[1475544660] ndomod: NDOMOD 2.1.1 (09-06-2016) Copyright (c) 2009 Nagios Core Development Team and Co
[1475544660] ndomod: Successfully connected to data sink. 0 queued items to flush.
[1475544660] ndomod registered for process data
[1475544660] ndomod registered for timed event data
[1475544660] ndomod registered for log data'
[1475544660] ndomod registered for system command data'
[1475544660] ndomod registered for event handler data'
[1475544660] ndomod registered for notification data'
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 5/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
[1475544660] ndomod registered for service check data'
[1475544660] ndomod registered for host check data'
[1475544660] ndomod registered for comment data'
[1475544660] ndomod registered for downtime data'
[1475544660] ndomod registered for flapping data'
[1475544660] ndomod registered for program status data'
[1475544660] ndomod registered for host status data'
[1475544660] ndomod registered for service status data'
[1475544660] ndomod registered for adaptive program data'
[1475544660] ndomod registered for adaptive host data'
[1475544660] ndomod registered for adaptive service data'
[1475544660] ndomod registered for external command data'
[1475544660] ndomod registered for aggregated status data'
[1475544660] ndomod registered for retention data'
[1475544660] ndomod registered for contact data'
[1475544660] ndomod registered for contact notification data'
[1475544660] ndomod registered for acknowledgement data'
[1475544660] ndomod registered for state change data'
[1475544660] ndomod registered for contact status data'
[1475544660] ndomod registered for adaptive contact data'
[1475544660] Event broker module '/usr/local/nagios/bin/ndomod.o' initialized successfully.
This command will show you the database with populated data:
Service Commands
Different Linux distributions have different methods of starting / stopping / restarting / status ndo2db.
start ndo2db
stop ndo2db
restart ndo2db
status ndo2db
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 6/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
Ubuntu
Prerequisites
During the install you will be prompted for the password of the "root" user. This guide uses the password mypassword and will be
Password Note:
In future commands you will see the password is provided using the -p argument like follows:
NOTE: It's very important to NOT put a space between the -p and the 'mypassword'.
MySQL is started as part of the installation process and configured to start when the system boots:
Create Database
There will also be a dedicated user account called ndoutils with the password ndoutils_password (we suggest you use a mo
The storage location of the database will be the default location that MySQL uses, this can be changed however it is not covered in
This command will connect to the local MySQL database engine interface.
Now execute these four commands (press Enter after each command):
Now you can exit the local MySQL database engine interface.
\q
Run this command to ensure that the database has been created:
Database
information_schema
nagios
test
NDOUtils uses the kernel message queue for transferring the data from Nagios to NDOUtils. We are going to increase the default v
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 7/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
sudo cp /etc/sysctl.conf /etc/sysctl.conf_backup
kernel.msgmnb = 131072000
kernel.msgmax = 131072000
kernel.shmmax = 4294967295
kernel.shmall = 268435456
There is no need to reboot the system, the last command ensured the new settings are active in the kernel.
cd /tmp
wget -O ndoutils.tar.gz https://github.com/NagiosEnterprises/ndoutils/archive/ndoutils-2.1.3.tar.gz
tar xzf ndoutils.tar.gz
Compile NDOUtils
cd /tmp/ndoutils-ndoutils-2.1.3/
sudo ./configure
sudo make all
Install Binaries
Initialize Database
cd db/
sudo ./installdb -u 'ndoutils' -p 'ndoutils_password' -h 'localhost' -d nagios
cd ..
That first line of output that says failed: Table 'nagios.nagios_dbversion' doesn't exist is expected, it's testing t
This installs the config files as well as configuring the MySQL credentials so NDOUtils can connect to the database.
/usr/local/nagios/etc/ndo2db.cfg
db_user=ndoutils
db_pass=ndoutils_password
You should make sure the username and password are correct.
/usr/local/nagios/etc/ndomod.cfg
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 8/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
No changes are required in this file.
Using the default username and password the following commands install the configuration files and make the required changes.
This installs the service or daemon files and configure them to start on boot.
Different Linux distributions have different methods of starting the ndo2db service.
Now you need to tell Nagios to use the NDO broker module. This is as simple as adding the following line to the nagios.cfg file:
broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg
The following commands will add that line as well as an extra line that explains what the module is for.
Restart Nagios
Now you need to restart Nagios to use the NDO broker module. Different Linux distributions have different methods of restarting N
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 9/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
Check NDOUtils Is Working
This command will show Nagios successfully loaded the NDO module:
[1475544660] ndomod: NDOMOD 2.1.1 (09-06-2016) Copyright (c) 2009 Nagios Core Development Team and Co
[1475544660] ndomod: Successfully connected to data sink. 0 queued items to flush.
[1475544660] ndomod registered for process data
[1475544660] ndomod registered for timed event data
[1475544660] ndomod registered for log data'
[1475544660] ndomod registered for system command data'
[1475544660] ndomod registered for event handler data'
[1475544660] ndomod registered for notification data'
[1475544660] ndomod registered for service check data'
[1475544660] ndomod registered for host check data'
[1475544660] ndomod registered for comment data'
[1475544660] ndomod registered for downtime data'
[1475544660] ndomod registered for flapping data'
[1475544660] ndomod registered for program status data'
[1475544660] ndomod registered for host status data'
[1475544660] ndomod registered for service status data'
[1475544660] ndomod registered for adaptive program data'
[1475544660] ndomod registered for adaptive host data'
[1475544660] ndomod registered for adaptive service data'
[1475544660] ndomod registered for external command data'
[1475544660] ndomod registered for aggregated status data'
[1475544660] ndomod registered for retention data'
[1475544660] ndomod registered for contact data'
[1475544660] ndomod registered for contact notification data'
[1475544660] ndomod registered for acknowledgement data'
[1475544660] ndomod registered for state change data'
[1475544660] ndomod registered for contact status data'
[1475544660] ndomod registered for adaptive contact data'
[1475544660] Event broker module '/usr/local/nagios/bin/ndomod.o' initialized successfully.
This command will show you the database with populated data:
Service Commands
Different Linux distributions have different methods of starting / stopping / restarting / status ndo2db.
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 10/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
sudo start ndo2db
sudo stop ndo2db
sudo restart ndo2db
sudo status ndo2db
cd /tmp
wget https://dev.mysql.com/get/mysql57-community-release-sles12-11.noarch.rpm
sudo rpm -ihv mysql57-community-release-sles12-11.noarch.rpm
sudo rpm --import /etc/RPM-GPG-KEY-mysql
sudo zypper refresh
Before configuring MySQL you must start the service and configure it to boot on startup.
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 11/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
3461 ? Ssl 0:00 /usr/sbin/mysqld --defaults-file=/etc/my.cnf --user=mysql
The password being defined is 'mypassword' and will be used in future commands (we suggest you use a more secure password
The 'single quotes' are used to define the boundaries of the password, this is extremely important when the password contains a
MySQL Community Edition creates a password for you by default and is recoreded in the /var/log/mysql/mysqld.log file. To
To change the password, use the following command. Keep in mind the password needs to be a stronger password than the exam
Password Note:
In future commands you will see the password is provided using the -p argument like follows:
NOTE: It's very important to NOT put a space between the -p and the 'mypassword'.
Create Database
There will also be a dedicated user account called ndoutils with the password ndoutils_password (we suggest you use a mo
The storage location of the database will be the default location that MySQL uses, this can be changed however it is not covered in
This command will connect to the local MySQL database engine interface.
Now execute these four commands (press Enter after each command):
Now you can exit the local MySQL database engine interface.
\q
Run this command to ensure that the database has been created:
Database
information_schema
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 12/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
nagios
test
NDOUtils uses the kernel message queue for transferring the data from Nagios to NDOUtils. We are going to increase the default v
Then this last command depends on the OS version you are running:
kernel.msgmnb = 131072000
kernel.msgmax = 131072000
kernel.shmmax = 4294967295
kernel.shmall = 268435456
There is no need to reboot the system, the last command ensured the new settings are active in the kernel.
cd /tmp
wget -O ndoutils.tar.gz https://github.com/NagiosEnterprises/ndoutils/archive/ndoutils-2.1.3.tar.gz
tar xzf ndoutils.tar.gz
Compile NDOUtils
cd /tmp/ndoutils-ndoutils-2.1.3/
sudo ./configure
sudo make all
Install Binaries
Initialize Database
cd db/
sudo ./installdb -u 'ndoutils' -p 'ndoutils_password' -h 'localhost' -d nagios
cd ..
cd db/
sudo ./installdb -u 'ndoutils' -p 'ndoutils_password' -h '127.0.0.1' -d nagios
cd ..
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 13/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
That first line of output that says failed: Table 'nagios.nagios_dbversion' doesn't exist is expected, it's testing t
This installs the config files as well as configuring the MySQL credentials so NDOUtils can connect to the database.
/usr/local/nagios/etc/ndo2db.cfg
db_user=ndoutils
db_pass=ndoutils_password
You should make sure the username and password are correct.
For SUSE SLES 12.x you will also need to change db_host=localhost to:
db_host=127.0.0.1
/usr/local/nagios/etc/ndomod.cfg
Using the default username and password the following commands install the configuration files and make the required changes.
For SUSE SLES 12.x you will also need to change db_host=localhost to:
This installs the service or daemon files and configure them to start on boot.
Different Linux distributions have different methods of starting the ndo2db service.
Now you need to tell Nagios to use the NDO broker module. This is as simple as adding the following line to the nagios.cfg file:
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 14/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg
The following commands will add that line as well as an extra line that explains what the module is for.
Restart Nagios
Now you need to restart Nagios to use the NDO broker module. Different Linux distributions have different methods of restarting N
This command will show Nagios successfully loaded the NDO module:
[1475544660] ndomod: NDOMOD 2.1.1 (09-06-2016) Copyright (c) 2009 Nagios Core Development Team and Co
[1475544660] ndomod: Successfully connected to data sink. 0 queued items to flush.
[1475544660] ndomod registered for process data
[1475544660] ndomod registered for timed event data
[1475544660] ndomod registered for log data'
[1475544660] ndomod registered for system command data'
[1475544660] ndomod registered for event handler data'
[1475544660] ndomod registered for notification data'
[1475544660] ndomod registered for service check data'
[1475544660] ndomod registered for host check data'
[1475544660] ndomod registered for comment data'
[1475544660] ndomod registered for downtime data'
[1475544660] ndomod registered for flapping data'
[1475544660] ndomod registered for program status data'
[1475544660] ndomod registered for host status data'
[1475544660] ndomod registered for service status data'
[1475544660] ndomod registered for adaptive program data'
[1475544660] ndomod registered for adaptive host data'
[1475544660] ndomod registered for adaptive service data'
[1475544660] ndomod registered for external command data'
[1475544660] ndomod registered for aggregated status data'
[1475544660] ndomod registered for retention data'
[1475544660] ndomod registered for contact data'
[1475544660] ndomod registered for contact notification data'
[1475544660] ndomod registered for acknowledgement data'
[1475544660] ndomod registered for state change data'
[1475544660] ndomod registered for contact status data'
[1475544660] ndomod registered for adaptive contact data'
[1475544660] Event broker module '/usr/local/nagios/bin/ndomod.o' initialized successfully.
This command will show you the database with populated data:
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 15/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
The last command should output something like:
Service Commands
Different Linux distributions have different methods of starting / stopping / restarting / status NRPE.
Debian | Raspbian
All steps on Debian require to run as root. To become root simply run:
Debian:
su
Raspbian:
sudo -i
Prerequisites
apt-get update
apt-get install -y mysql-server libmysqlclient-dev libdbd-mysql-perl
During the install you will be prompted for the password of the "root" user. This guide uses the password mypassword and will be
MySQL is started as part of the installation process and configured to start when the system boots:
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 16/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
Check that it is running:
The password being defined is 'mypassword' and will be used in future commands (we suggest you use a more secure password
The 'single quotes' are used to define the boundaries of the password, this is extremely important when the password contains a
Password Note:
In future commands you will see the password is provided using the -p argument like follows:
NOTE: It's very important to NOT put a space between the -p and the 'mypassword'.
Create Database
There will also be a dedicated user account called ndoutils with the password ndoutils_password (we suggest you use a mo
The storage location of the database will be the default location that MySQL uses, this can be changed however it is not covered in
This command will connect to the local MySQL database engine interface.
Now execute these four commands (press Enter after each command):
Now you can exit the local MySQL database engine interface.
\q
Run this command to ensure that the database has been created:
Database
information_schema
nagios
test
NDOUtils uses the kernel message queue for transferring the data from Nagios to NDOUtils. We are going to increase the default v
cp /etc/sysctl.conf /etc/sysctl.conf_backup
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 17/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
printf "kernel.msgmax = 131072000\n" >> /etc/sysctl.conf
printf "kernel.shmmax = 4294967295\n" >> /etc/sysctl.conf
printf "kernel.shmall = 268435456\n" >> /etc/sysctl.conf
sysctl -e -p /etc/sysctl.conf
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 131072000
kernel.msgmax = 131072000
kernel.shmmax = 4294967295
kernel.shmall = 268435456
There is no need to reboot the system, the last command ensured the new settings are active in the kernel.
cd /tmp
wget -O ndoutils.tar.gz https://github.com/NagiosEnterprises/ndoutils/archive/ndoutils-2.1.3.tar.gz
tar xzf ndoutils.tar.gz
Compile NDOUtils
cd /tmp/ndoutils-ndoutils-2.1.3/
./configure
make all
Install Binaries
make install
Initialize Database
cd db/
./installdb -u 'ndoutils' -p 'ndoutils_password' -h 'localhost' -d nagios
cd ..
That first line of output that says failed: Table 'nagios.nagios_dbversion' doesn't exist is expected, it's testing t
This installs the config files as well as configuring the MySQL credentials so NDOUtils can connect to the database.
/usr/local/nagios/etc/ndo2db.cfg
db_user=ndoutils
db_pass=ndoutils_password
You should make sure the username and password are correct.
/usr/local/nagios/etc/ndomod.cfg
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 18/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
Using the default username and password the following commands install the configuration files and make the required changes.
make install-config
mv /usr/local/nagios/etc/ndo2db.cfg-sample /usr/local/nagios/etc/ndo2db.cfg
sed -i 's/^db_user=.*/db_user=ndoutils/g' /usr/local/nagios/etc/ndo2db.cfg
sed -i 's/^db_pass=.*/db_pass=ndoutils_password/g' /usr/local/nagios/etc/ndo2db.cfg
mv /usr/local/nagios/etc/ndomod.cfg-sample /usr/local/nagios/etc/ndomod.cfg
This installs the service or daemon files and configure them to start on boot.
make install-init
update-rc.d ndo2db defaults
make install-init
systemctl enable ndo2db.service
Different Linux distributions have different methods of starting the ndo2db service.
Now you need to tell Nagios to use the NDO broker module. This is as simple as adding the following line to the nagios.cfg file:
broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg
The following commands will add that line as well as an extra line that explains what the module is for.
Restart Nagios
Now you need to restart Nagios to use the NDO broker module. Different Linux distributions have different methods of restarting N
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 19/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
There are a couple of differtent ways to ensure NDO2DB is working.
This command will show Nagios successfully loaded the NDO module:
[1475544660] ndomod: NDOMOD 2.1.1 (09-06-2016) Copyright (c) 2009 Nagios Core Development Team and Co
[1475544660] ndomod: Successfully connected to data sink. 0 queued items to flush.
[1475544660] ndomod registered for process data
[1475544660] ndomod registered for timed event data
[1475544660] ndomod registered for log data'
[1475544660] ndomod registered for system command data'
[1475544660] ndomod registered for event handler data'
[1475544660] ndomod registered for notification data'
[1475544660] ndomod registered for service check data'
[1475544660] ndomod registered for host check data'
[1475544660] ndomod registered for comment data'
[1475544660] ndomod registered for downtime data'
[1475544660] ndomod registered for flapping data'
[1475544660] ndomod registered for program status data'
[1475544660] ndomod registered for host status data'
[1475544660] ndomod registered for service status data'
[1475544660] ndomod registered for adaptive program data'
[1475544660] ndomod registered for adaptive host data'
[1475544660] ndomod registered for adaptive service data'
[1475544660] ndomod registered for external command data'
[1475544660] ndomod registered for aggregated status data'
[1475544660] ndomod registered for retention data'
[1475544660] ndomod registered for contact data'
[1475544660] ndomod registered for contact notification data'
[1475544660] ndomod registered for acknowledgement data'
[1475544660] ndomod registered for state change data'
[1475544660] ndomod registered for contact status data'
[1475544660] ndomod registered for adaptive contact data'
[1475544660] Event broker module '/usr/local/nagios/bin/ndomod.o' initialized successfully.
This command will show you the database with populated data:
Service Commands
Different Linux distributions have different methods of starting / stopping / restarting / status ndo2db.
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 20/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
service ndo2db restart
service ndo2db status
Fedora
Prerequisites
Before configuring MariaDB you must start the service and configure it to boot on startup.
Now to define the password for the root account in MySQL / MariaDB.
The password being defined is 'mypassword' and will be used in future commands (we suggest you use a more secure password
The 'single quotes' are used to define the boundaries of the password, this is extremely important when the password contains a
Password Note:
In future commands you will see the password is provided using the -p argument like follows:
NOTE: It's very important to NOT put a space between the -p and the 'mypassword'.
Create Database
There will also be a dedicated user account called ndoutils with the password ndoutils_password (we suggest you use a mo
The storage location of the database will be the default location that MySQL / MariaDB uses, this can be changed however it is not
This command will connect to the local MySQL / MariaDB database engine interface.
Now execute these four commands (press Enter after each command):
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 21/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
CREATE USER 'ndoutils'@'localhost' IDENTIFIED BY 'ndoutils_password';
Now you can exit the local MySQL / MariaDB database engine interface.
\q
Run this command to ensure that the database has been created:
Database
information_schema
nagios
test
NDOUtils uses the kernel message queue for transferring the data from Nagios to NDOUtils. We are going to increase the default v
cp /etc/sysctl.conf /etc/sysctl.conf_backup
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 131072000
kernel.msgmax = 131072000
kernel.shmmax = 4294967295
kernel.shmall = 268435456
There is no need to reboot the system, the last command ensured the new settings are active in the kernel.
cd /tmp
wget -O ndoutils.tar.gz https://github.com/NagiosEnterprises/ndoutils/archive/ndoutils-2.1.3.tar.gz
tar xzf ndoutils.tar.gz
Compile NDOUtils
cd /tmp/ndoutils-ndoutils-2.1.3/
./configure
make all
Install Binaries
make install
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 22/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
Initialize Database
cd db/
./installdb -u 'ndoutils' -p 'ndoutils_password' -h 'localhost' -d nagios
cd ..
That first line of output that says failed: Table 'nagios.nagios_dbversion' doesn't exist is expected, it's testing t
This installs the config files as well as configuring the MySQL / MariaDB credentials so NDOUtils can connect to the database.
/usr/local/nagios/etc/ndo2db.cfg
db_user=ndoutils
db_pass=ndoutils_password
You should make sure the username and password are correct.
/usr/local/nagios/etc/ndomod.cfg
Using the default username and password the following commands install the configuration files and make the required changes.
make install-config
mv /usr/local/nagios/etc/ndo2db.cfg-sample /usr/local/nagios/etc/ndo2db.cfg
sed -i 's/^db_user=.*/db_user=ndoutils/g' /usr/local/nagios/etc/ndo2db.cfg
sed -i 's/^db_pass=.*/db_pass=ndoutils_password/g' /usr/local/nagios/etc/ndo2db.cfg
mv /usr/local/nagios/etc/ndomod.cfg-sample /usr/local/nagios/etc/ndomod.cfg
This installs the service or daemon files and configure them to start on boot.
make install-init
systemctl enable ndo2db.service
Different Linux distributions have different methods of starting the ndo2db service.
Now you need to tell Nagios to use the NDO broker module. This is as simple as adding the following line to the nagios.cfg file:
broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg
The following commands will add that line as well as an extra line that explains what the module is for.
Restart Nagios
Now you need to restart Nagios to use the NDO broker module. Different Linux distributions have different methods of restarting N
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 23/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
This command will show Nagios successfully loaded the NDO module:
[1475544660] ndomod: NDOMOD 2.1.1 (09-06-2016) Copyright (c) 2009 Nagios Core Development Team and Co
[1475544660] ndomod: Successfully connected to data sink. 0 queued items to flush.
[1475544660] ndomod registered for process data
[1475544660] ndomod registered for timed event data
[1475544660] ndomod registered for log data'
[1475544660] ndomod registered for system command data'
[1475544660] ndomod registered for event handler data'
[1475544660] ndomod registered for notification data'
[1475544660] ndomod registered for service check data'
[1475544660] ndomod registered for host check data'
[1475544660] ndomod registered for comment data'
[1475544660] ndomod registered for downtime data'
[1475544660] ndomod registered for flapping data'
[1475544660] ndomod registered for program status data'
[1475544660] ndomod registered for host status data'
[1475544660] ndomod registered for service status data'
[1475544660] ndomod registered for adaptive program data'
[1475544660] ndomod registered for adaptive host data'
[1475544660] ndomod registered for adaptive service data'
[1475544660] ndomod registered for external command data'
[1475544660] ndomod registered for aggregated status data'
[1475544660] ndomod registered for retention data'
[1475544660] ndomod registered for contact data'
[1475544660] ndomod registered for contact notification data'
[1475544660] ndomod registered for acknowledgement data'
[1475544660] ndomod registered for state change data'
[1475544660] ndomod registered for contact status data'
[1475544660] ndomod registered for adaptive contact data'
[1475544660] Event broker module '/usr/local/nagios/bin/ndomod.o' initialized successfully.
This command will show you the database with populated data:
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 24/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
Service Commands
Different Linux distributions have different methods of starting / stopping / restarting / status ndo2db.
Arch Linux
Prerequisites
The password being defined is 'mypassword' and will be used in future commands (we suggest you use a more secure password
The 'single quotes' are used to define the boundaries of the password, this is extremely important when the password contains a
Password Note:
In future commands you will see the password is provided using the -p argument like follows:
NOTE: It's very important to NOT put a space between the -p and the 'mypassword'.
Create Database
There will also be a dedicated user account called ndoutils with the password ndoutils_password (we suggest you use a mo
The storage location of the database will be the default location that MariaDB uses, this can be changed however it is not covered
This command will connect to the local MariaDB database engine interface.
Now execute these four commands (press Enter after each command):
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 25/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
GRANT USAGE ON *.* TO 'ndoutils'@'localhost' IDENTIFIED BY 'ndoutils_password' WITH MAX_QUERIES_PER_H
Now you can exit the local MariaDB database engine interface.
\q
Run this command to ensure that the database has been created:
Database
information_schema
nagios
test
NDOUtils uses the kernel message queue for transferring the data from Nagios to NDOUtils. We are going to increase the default v
kernel.msgmnb = 131072000
kernel.msgmax = 131072000
kernel.shmmax = 4294967295
kernel.shmall = 268435456
There is no need to reboot the system, the last command ensured the new settings are active in the kernel.
cd /tmp
wget -O ndoutils.tar.gz https://github.com/NagiosEnterprises/ndoutils/archive/ndoutils-2.1.3.tar.gz
tar xzf ndoutils.tar.gz
Compile NDOUtils
cd /tmp/ndoutils-ndoutils-2.1.3/
./configure
make all
Install Binaries
make install
Initialize Database
cd db/
./installdb -u 'ndoutils' -p 'ndoutils_password' -h 'localhost' -d nagios
cd ..
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 26/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
** Updating table nagios_dbversion
Done!
That first line of output that says failed: Table 'nagios.nagios_dbversion' doesn't exist is expected, it's testing t
This installs the config files as well as configuring the MariaDB credentials so NDOUtils can connect to the database.
/usr/local/nagios/etc/ndo2db.cfg
db_user=ndoutils
db_pass=ndoutils_password
You should make sure the username and password are correct.
/usr/local/nagios/etc/ndomod.cfg
Using the default username and password the following commands install the configuration files and make the required changes.
make install-config
mv /usr/local/nagios/etc/ndo2db.cfg-sample /usr/local/nagios/etc/ndo2db.cfg
sed -i 's/^db_user=.*/db_user=ndoutils/g' /usr/local/nagios/etc/ndo2db.cfg
sed -i 's/^db_pass=.*/db_pass=ndoutils_password/g' /usr/local/nagios/etc/ndo2db.cfg
mv /usr/local/nagios/etc/ndomod.cfg-sample /usr/local/nagios/etc/ndomod.cfg
This installs the service or daemon files and configure them to start on boot.
make install-init
systemctl enable ndo2db.service
Different Linux distributions have different methods of starting the ndo2db service.
Now you need to tell Nagios to use the NDO broker module. This is as simple as adding the following line to the nagios.cfg file:
broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg
The following commands will add that line as well as an extra line that explains what the module is for.
Restart Nagios
Now you need to restart Nagios to use the NDO broker module. Different Linux distributions have different methods of restarting N
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 27/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
This command will show Nagios successfully loaded the NDO module:
[1494014201] ndomod: NDOMOD 2.1.3 (2017-04-13) Copyright (c) 2009 Nagios Core Development Team and Co
[1494014201] ndomod: Could not open data sink! I'll keep trying, but some output may get lost...
[1494014201] ndomod registered for process data
[1494014201] ndomod registered for timed event data
[1494014201] ndomod registered for log data'
[1494014201] ndomod registered for system command data'
[1494014201] ndomod registered for event handler data'
[1494014201] ndomod registered for notification data'
[1494014201] ndomod registered for service check data'
[1494014201] ndomod registered for host check data'
[1494014201] ndomod registered for comment data'
[1494014201] ndomod registered for downtime data'
[1494014201] ndomod registered for flapping data'
[1494014201] ndomod registered for program status data'
[1494014201] ndomod registered for host status data'
[1494014201] ndomod registered for service status data'
[1494014201] ndomod registered for adaptive program data'
[1494014201] ndomod registered for adaptive host data'
[1494014201] ndomod registered for adaptive service data'
[1494014201] ndomod registered for external command data'
[1494014201] ndomod registered for aggregated status data'
[1494014201] ndomod registered for retention data'
[1494014201] ndomod registered for contact data'
[1494014201] ndomod registered for contact notification data'
[1494014201] ndomod registered for acknowledgement data'
[1494014201] ndomod registered for state change data'
[1494014201] ndomod registered for contact status data'
[1494014201] ndomod registered for adaptive contact data'
[1494014201] Event broker module '/usr/local/nagios/bin/ndomod.o' initialized successfully.
This command will show you the database with populated data:
Service Commands
Different Linux distributions have different methods of starting / stopping / restarting / status ndo2db.
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 28/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
Gentoo
Prerequisites
emerge --sync
emerge --noreplace dev-db/mysql
The output of the installation of mysql will product some thing like:
This will prompt you to type a password for the root account in MySQL.
This KB article is using the password of 'mypassword' and will be used in future commands (we suggest you use a more secure p
Password Note:
In future commands you will see the password is provided using the -p argument like follows:
NOTE: It's very important to NOT put a space between the -p and the 'mypassword'.
Create Database
There will also be a dedicated user account called ndoutils with the password ndoutils_password (we suggest you use a mo
The storage location of the database will be the default location that MySQL uses, this can be changed however it is not covered in
This command will connect to the local MySQL database engine interface.
Now execute these four commands (press Enter after each command):
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 29/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
GRANT ALL PRIVILEGES ON nagios.* TO 'ndoutils'@'localhost' WITH GRANT OPTION ;
Now you can exit the local MariaDB database engine interface.
\q
Run this command to ensure that the database has been created:
Database
information_schema
nagios
test
NDOUtils uses the kernel message queue for transferring the data from Nagios to NDOUtils. We are going to increase the default v
kernel.msgmnb = 131072000
kernel.msgmax = 131072000
kernel.shmmax = 4294967295
kernel.shmall = 268435456
There is no need to reboot the system, the last command ensured the new settings are active in the kernel.
Some additional files will be downloaded so the init scripts are correctly created.
cd /tmp
wget -O ndoutils.tar.gz https://github.com/NagiosEnterprises/ndoutils/archive/ndoutils-2.1.3.tar.gz
tar xzf ndoutils.tar.gz
wget --no-check-certificate -O ndoutils-ndoutils-2.1.3/startup/gentoo-init.in https://raw.githubuserc
wget --no-check-certificate -O ndoutils-ndoutils-2.1.3/Makefile.in https://raw.githubusercontent.com/
wget --no-check-certificate -O ndoutils-ndoutils-2.1.3/configure https://raw.githubusercontent.com/bo
Compile NDOUtils
cd /tmp/ndoutils-ndoutils-2.1.3/
./configure
make all
Install Binaries
make install
Initialize Database
cd db/
./installdb -u 'ndoutils' -p 'ndoutils_password' -h 'localhost' -d nagios
cd ..
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 30/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
DBD::mysql::db do failed: Table 'nagios.nagios_dbversion' doesn't exist at ./installdb line 52.
** Creating tables for version 2.0.1
Using mysql.sql for installation...
** Updating table nagios_dbversion
Done!
That first line of output that says failed: Table 'nagios.nagios_dbversion' doesn't exist is expected, it's testing t
This installs the config files as well as configuring the MariaDB credentials so NDOUtils can connect to the database.
/usr/local/nagios/etc/ndo2db.cfg
db_user=ndoutils
db_pass=ndoutils_password
You should make sure the username and password are correct.
/usr/local/nagios/etc/ndomod.cfg
Using the default username and password the following commands install the configuration files and make the required changes.
make install-config
mv /usr/local/nagios/etc/ndo2db.cfg-sample /usr/local/nagios/etc/ndo2db.cfg
sed -i 's/^db_user=.*/db_user=ndoutils/g' /usr/local/nagios/etc/ndo2db.cfg
sed -i 's/^db_pass=.*/db_pass=ndoutils_password/g' /usr/local/nagios/etc/ndo2db.cfg
mv /usr/local/nagios/etc/ndomod.cfg-sample /usr/local/nagios/etc/ndomod.cfg
This installs the service or daemon files and configure them to start on boot.
make install-init
Different Linux distributions have different methods of starting the ndo2db service.
Now you need to tell Nagios to use the NDO broker module. This is as simple as adding the following line to the nagios.cfg file:
broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg
The following commands will add that line as well as an extra line that explains what the module is for.
Restart Nagios
Now you need to restart Nagios to use the NDO broker module. Different Linux distributions have different methods of restarting N
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 31/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
This command will show Nagios successfully loaded the NDO module:
[1494014201] ndomod: NDOMOD 2.1.3 (2017-04-13) Copyright (c) 2009 Nagios Core Development Team and Co
[1494014201] ndomod: Could not open data sink! I'll keep trying, but some output may get lost...
[1494014201] ndomod registered for process data
[1494014201] ndomod registered for timed event data
[1494014201] ndomod registered for log data'
[1494014201] ndomod registered for system command data'
[1494014201] ndomod registered for event handler data'
[1494014201] ndomod registered for notification data'
[1494014201] ndomod registered for service check data'
[1494014201] ndomod registered for host check data'
[1494014201] ndomod registered for comment data'
[1494014201] ndomod registered for downtime data'
[1494014201] ndomod registered for flapping data'
[1494014201] ndomod registered for program status data'
[1494014201] ndomod registered for host status data'
[1494014201] ndomod registered for service status data'
[1494014201] ndomod registered for adaptive program data'
[1494014201] ndomod registered for adaptive host data'
[1494014201] ndomod registered for adaptive service data'
[1494014201] ndomod registered for external command data'
[1494014201] ndomod registered for aggregated status data'
[1494014201] ndomod registered for retention data'
[1494014201] ndomod registered for contact data'
[1494014201] ndomod registered for contact notification data'
[1494014201] ndomod registered for acknowledgement data'
[1494014201] ndomod registered for state change data'
[1494014201] ndomod registered for contact status data'
[1494014201] ndomod registered for adaptive contact data'
[1494014201] Event broker module '/usr/local/nagios/bin/ndomod.o' initialized successfully.
This command will show you the database with populated data:
Service Commands
Different Linux distributions have different methods of starting / stopping / restarting / status ndo2db.
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 32/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
FreeBSD
There is an issue with NDOUtils on FreeBSD that have been reported in the following GitHub issue:
Module ndomod.o is using an old or unspecified version of the event broker API. Module will be unloaded.
Prerequisites
In the steps below, when installing FreeBSD packages you will be prompted with screens asking what you would like installed. You
Before configuring MySQL you must start the service and configure it to boot on startup.
The password being defined is 'mypassword' and will be used in future commands (we suggest you use a more secure password
The 'single quotes' are used to define the boundaries of the password, this is extremely important when the password contains a
Password Note:
In future commands you will see the password is provided using the -p argument like follows:
NOTE: It's very important to NOT put a space between the -p and the 'mypassword'.
Create Database
There will also be a dedicated user account called ndoutils with the password ndoutils_password (we suggest you use a mo
The storage location of the database will be the default location that MySQL uses, this can be changed however it is not covered in
This command will connect to the local MySQL database engine interface.
Now execute these four commands (press Enter after each command):
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 33/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
Now you can exit the local MySQL database engine interface.
\q
Run this command to ensure that the database has been created:
Database
information_schema
nagios
test
NDOUtils uses the kernel message queue for transferring the data from Nagios to NDOUtils. We are going to increase the default v
cp /etc/sysctl.conf /etc/sysctl.conf_backup
cp /boot/loader.conf /boot/loader.conf_backup
You need to reboot the system to ensure the new settings are active in the kernel:
reboot
cd /tmp
wget -O ndoutils.tar.gz https://github.com/NagiosEnterprises/ndoutils/archive/ndoutils-2.1.3.tar.gz
tar xzf ndoutils.tar.gz
Compile NDOUtils
cd /tmp/ndoutils-ndoutils-2.1.3/
./configure
gmake all
Install Binaries
gmake install
Initialize Database
cd db/
perl ./installdb -u 'ndoutils' -p 'ndoutils_password' -h 'localhost' -d nagios
cd ..
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 34/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
That first line of output that says failed: Table 'nagios.nagios_dbversion' doesn't exist is expected, it's testing t
This installs the config files as well as configuring the MySQL credentials so NDOUtils can connect to the database.
/usr/local/nagios/etc/ndo2db.cfg
db_user=ndoutils
db_pass=ndoutils_password
You should make sure the username and password are correct.
/usr/local/nagios/etc/ndomod.cfg
Using the default username and password the following commands install the configuration files and make the required changes.
gmake install-config
mv /usr/local/nagios/etc/ndo2db.cfg-sample /usr/local/nagios/etc/ndo2db.cfg
sed -i '' 's/^db_user=.*/db_user=ndoutils/g' /usr/local/nagios/etc/ndo2db.cfg
sed -i '' 's/^db_pass=.*/db_pass=ndoutils_password/g' /usr/local/nagios/etc/ndo2db.cfg
mv /usr/local/nagios/etc/ndomod.cfg-sample /usr/local/nagios/etc/ndomod.cfg
This installs the service or daemon files and configure them to start on boot.
gmake install-init
echo '/usr/local/etc/rc.d/ndo2db start' >> /etc/rc.local
Now you need to tell Nagios to use the NDO broker module. This is as simple as adding the following line to the nagios.cfg file:
broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg
The following commands will add that line as well as an extra line that explains what the module is for.
Restart Nagios
Now you need to restart Nagios to use the NDO broker module. Different Linux distributions have different methods of restarting N
This command will show Nagios successfully loaded the NDO module:
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 35/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
The last command should output something like:
[1475544660] ndomod: NDOMOD 2.1.1 (09-06-2016) Copyright (c) 2009 Nagios Core Development Team and Co
[1475544660] ndomod: Successfully connected to data sink. 0 queued items to flush.
[1475544660] ndomod registered for process data
[1475544660] ndomod registered for timed event data
[1475544660] ndomod registered for log data'
[1475544660] ndomod registered for system command data'
[1475544660] ndomod registered for event handler data'
[1475544660] ndomod registered for notification data'
[1475544660] ndomod registered for service check data'
[1475544660] ndomod registered for host check data'
[1475544660] ndomod registered for comment data'
[1475544660] ndomod registered for downtime data'
[1475544660] ndomod registered for flapping data'
[1475544660] ndomod registered for program status data'
[1475544660] ndomod registered for host status data'
[1475544660] ndomod registered for service status data'
[1475544660] ndomod registered for adaptive program data'
[1475544660] ndomod registered for adaptive host data'
[1475544660] ndomod registered for adaptive service data'
[1475544660] ndomod registered for external command data'
[1475544660] ndomod registered for aggregated status data'
[1475544660] ndomod registered for retention data'
[1475544660] ndomod registered for contact data'
[1475544660] ndomod registered for contact notification data'
[1475544660] ndomod registered for acknowledgement data'
[1475544660] ndomod registered for state change data'
[1475544660] ndomod registered for contact status data'
[1475544660] ndomod registered for adaptive contact data'
[1475544660] Event broker module '/usr/local/nagios/bin/ndomod.o' initialized successfully.
This command will show you the database with populated data:
Service Commands
Solaris
There are some issues with NDOUtils on Solaris that have been reported in the following GitHub issues:
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 36/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
ndo.sock is not deleted when service is disabled/stopped
ndo2db service will not start if nagios user home directory does not exist
Prerequisites
Before configuring MySQL you must start the service and configure it to boot on startup.
The password being defined is 'mypassword' and will be used in future commands (we suggest you use a more secure password
The 'single quotes' are used to define the boundaries of the password, this is extremely important when the password contains a
Password Note:
In future commands you will see the password is provided using the -p argument like follows:
NOTE: It's very important to NOT put a space between the -p and the 'mypassword'.
Create Database
There will also be a dedicated user account called ndoutils with the password ndoutils_password (we suggest you use a mo
The storage location of the database will be the default location that MySQL uses, this can be changed however it is not covered in
This command will connect to the local MySQL database engine interface.
Now execute these four commands (press Enter after each command):
Now you can exit the local MySQL database engine interface.
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 37/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
\q
Run this command to ensure that the database has been created:
Database
information_schema
nagios
test
Kernel Settings
NDOUtils uses the kernel message queue for transferring the data from Nagios to NDOUtils.
http://docs.oracle.com/cd/E19253-01/817-0404/appendixa-6/index.html
http://docs.oracle.com/cd/E19253-01/817-1592/rmctrls-1/index.html
This documentation does not provide any steps on adjusting the interprocess message message queue parameters (as seen in the
cd /tmp
wget -O ndoutils.tar.gz https://github.com/NagiosEnterprises/ndoutils/archive/ndoutils-2.1.3.tar.gz
tar xzf ndoutils.tar.gz
Compile NDOUtils
cd /tmp/ndoutils-ndoutils-2.1.3/
./configure
gmake all
Install Binaries
gmake install
Initialize Database
cd db/
/opt/csw/bin/perl ./installdb -u 'ndoutils' -p 'ndoutils_password' -h 'localhost' -d nagios
cd ..
That first line of output that says failed: Table 'nagios.nagios_dbversion' doesn't exist is expected, it's testing t
This installs the config files as well as configuring the MySQL credentials so NDOUtils can connect to the database.
/usr/local/nagios/etc/ndo2db.cfg
db_user=ndoutils
db_pass=ndoutils_password
You should make sure the username and password are correct.
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 38/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
/usr/local/nagios/etc/ndomod.cfg
Using the default username and password the following commands install the configuration files and make the required changes.
gmake install-config
mv /usr/local/nagios/etc/ndo2db.cfg-sample /usr/local/nagios/etc/ndo2db.cfg
perl -p -i -e 's/^db_user=.*/db_user=ndoutils/g' /usr/local/nagios/etc/ndo2db.cfg
perl -p -i -e 's/^db_pass=.*/db_pass=ndoutils_password/g' /usr/local/nagios/etc/ndo2db.cfg
mv /usr/local/nagios/etc/ndomod.cfg-sample /usr/local/nagios/etc/ndomod.cfg
This installs the service or daemon files and configure them to start on boot.
Different Linux distributions have different methods of starting the ndo2db service.
Now you need to tell Nagios to use the NDO broker module. This is as simple as adding the following line to the nagios.cfg file:
broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg
The following commands will add that line as well as an extra line that explains what the module is for.
Restart Nagios
Now you need to restart Nagios to use the NDO broker module. Different Linux distributions have different methods of restarting N
This command will show Nagios successfully loaded the NDO module:
[1475544660] ndomod: NDOMOD 2.1.1 (09-06-2016) Copyright (c) 2009 Nagios Core Development Team and Co
[1475544660] ndomod: Successfully connected to data sink. 0 queued items to flush.
[1475544660] ndomod registered for process data
[1475544660] ndomod registered for timed event data
[1475544660] ndomod registered for log data'
[1475544660] ndomod registered for system command data'
[1475544660] ndomod registered for event handler data'
[1475544660] ndomod registered for notification data'
[1475544660] ndomod registered for service check data'
[1475544660] ndomod registered for host check data'
[1475544660] ndomod registered for comment data'
[1475544660] ndomod registered for downtime data'
[1475544660] ndomod registered for flapping data'
[1475544660] ndomod registered for program status data'
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 39/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
[1475544660] ndomod registered for host status data'
[1475544660] ndomod registered for service status data'
[1475544660] ndomod registered for adaptive program data'
[1475544660] ndomod registered for adaptive host data'
[1475544660] ndomod registered for adaptive service data'
[1475544660] ndomod registered for external command data'
[1475544660] ndomod registered for aggregated status data'
[1475544660] ndomod registered for retention data'
[1475544660] ndomod registered for contact data'
[1475544660] ndomod registered for contact notification data'
[1475544660] ndomod registered for acknowledgement data'
[1475544660] ndomod registered for state change data'
[1475544660] ndomod registered for contact status data'
[1475544660] ndomod registered for adaptive contact data'
[1475544660] Event broker module '/usr/local/nagios/bin/ndomod.o' initialized successfully.
This command will show you the database with populated data:
Service Commands
Apple OS X
There is an issue with NDOUtils on Apple OS X that have been reported in the following GitHub issue:
Prerequisites
This assumes that Xcode and MacPorts is already installed, which is detailed in this Nagios Core install guide:
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 40/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
Installing Nagios Core From Source
Before configuring MySQL you must start the service and configure it to boot on startup.
The password being defined is 'mypassword' and will be used in future commands (we suggest you use a more secure password
The 'single quotes' are used to define the boundaries of the password, this is extremely important when the password contains a
Password Note:
In future commands you will see the password is provided using the -p argument like follows:
NOTE: It's very important to NOT put a space between the -p and the 'mypassword'.
Create Database
There will also be a dedicated user account called ndoutils with the password ndoutils_password (we suggest you use a mo
The storage location of the database will be the default location that MySQL uses, this can be changed however it is not covered in
This command will connect to the local MySQL database engine interface.
Now execute these four commands (press Enter after each command):
Now you can exit the local MySQL database engine interface.
\q
Run this command to ensure that the database has been created:
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 41/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
Database
information_schema
nagios
test
Kernel Settings
NDOUtils uses the kernel message queue for transferring the data from Nagios to NDOUtils. This documentation does not provide a
documentation please feel free to contact us.
cd /tmp
curl -L -o ndoutils.tar.gz https://github.com/NagiosEnterprises/ndoutils/archive/ndoutils-2.1.3.tar.g
tar xzf ndoutils.tar.gz
Compile NDOUtils
cd /tmp/ndoutils-ndoutils-2.1.3/
sudo ./configure
sudo make all
Install Binaries
Initialize Database
cd db/
sudo perl ./installdb -u 'ndoutils' -p 'ndoutils_password' -h 'localhost' -d nagios
cd ..
That first line of output that says failed: Table 'nagios.nagios_dbversion' doesn't exist is expected, it's testing t
This installs the config files as well as configuring the MySQL credentials so NDOUtils can connect to the database.
/usr/local/nagios/etc/ndo2db.cfg
db_user=ndoutils
db_pass=ndoutils_password
You should make sure the username and password are correct.
/usr/local/nagios/etc/ndomod.cfg
Using the default username and password the following commands install the configuration files and make the required changes.
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 42/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
This installs the service or daemon files and configure them to start on boot.
Different Linux distributions have different methods of starting the ndo2db service.
Now you need to tell Nagios to use the NDO broker module. This is as simple as adding the following line to the nagios.cfg file:
broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg
The following commands will add that line as well as an extra line that explains what the module is for.
Restart Nagios
Now you need to restart Nagios to use the NDO broker module. Different Linux distributions have different methods of restarting N
This command will show Nagios successfully loaded the NDO module:
[1475544660] ndomod: NDOMOD 2.1.1 (09-06-2016) Copyright (c) 2009 Nagios Core Development Team and Co
[1475544660] ndomod: Successfully connected to data sink. 0 queued items to flush.
[1475544660] ndomod registered for process data
[1475544660] ndomod registered for timed event data
[1475544660] ndomod registered for log data'
[1475544660] ndomod registered for system command data'
[1475544660] ndomod registered for event handler data'
[1475544660] ndomod registered for notification data'
[1475544660] ndomod registered for service check data'
[1475544660] ndomod registered for host check data'
[1475544660] ndomod registered for comment data'
[1475544660] ndomod registered for downtime data'
[1475544660] ndomod registered for flapping data'
[1475544660] ndomod registered for program status data'
[1475544660] ndomod registered for host status data'
[1475544660] ndomod registered for service status data'
[1475544660] ndomod registered for adaptive program data'
[1475544660] ndomod registered for adaptive host data'
[1475544660] ndomod registered for adaptive service data'
[1475544660] ndomod registered for external command data'
[1475544660] ndomod registered for aggregated status data'
[1475544660] ndomod registered for retention data'
[1475544660] ndomod registered for contact data'
[1475544660] ndomod registered for contact notification data'
[1475544660] ndomod registered for acknowledgement data'
[1475544660] ndomod registered for state change data'
[1475544660] ndomod registered for contact status data'
[1475544660] ndomod registered for adaptive contact data'
[1475544660] Event broker module '/usr/local/nagios/bin/ndomod.o' initialized successfully.
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 43/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
This command will show you the database with populated data:
Service Commands
Hence if you wanted to restart the MySQL / Mariadb service it is advisable to stop Nagios first and then NDOUtils. After the MySQL
Following this method ensures data is correctly written to the database. You don't specifically have to follow this order, both Nagios
Final Thoughts
This completes the installation of NDOUtils and configuring Nagios to use the NDO broker module.
For any support related questions please visit the Nagios Support Forums at:
http://support.nagios.com/forum/
Posted by: tlea on Mon, Feb 1, 2016 at 11:06 PM. This article has been viewed 53123 times.
Filed Under: Installation
Print Article
Rate this article
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 44/45
2023/5/10 上午9:48 NDOUtils - Installing NDOUtils
Select One Rate
Email Article to Fr
Attachments
There are no attachments for this article.
Related Articles
There are no related articles for this article.
https://support.nagios.com/kb/article/ndoutils-installing-ndoutils-406.html#RHEL 45/45