Use ndo2fs to replace ndo2db such that you don't need MySQL server and result in lighter system load.
Official site: http://www.pnp4nagios.org/ndo2fs/start
These notes apply to version 0.2.1.
cd /src-folder ./configure --prefix=/usr make install make install-init
You need to set the correct path and communication method in the
program file /usr/bin/ndo2fs. This is a sample:
...
my %conf = (
BASEDIR => "/var/log/nagios",
HOOKDIR => "/usr/lib/hooks",
PID_FILE => "/var/lib/nagios/ndo2fs.pid",
SOCKET_TYPE => "UNIX",
SOCKET_PORT => "5668",
SOCKET_NAME => "/var/lib/nagios/ndo2fs.sock",
...
You also need to edit the initscript /etc/rc.d/init.d/ndo2fs. Set these correctly:
... ndo2fsBin=/usr/bin/ndo2fs ndo2fsParam="-d" ndo2fsSockFile=/var/lib/nagios/ndo2fs.sock ndo2fsLockFile=/var/lib/nagios/ndo2fs.pid ndo2fsUser=nagios ndo2fsGroup=nagios ...
Now, you need to tell ndomod to write data to the ndo2fs socket.
You need to edit /etc/nagios/ndomod.cfg:
... output=/var/lib/nagios/ndo2fs.sock data_processing_options = 32259009 ...
Start ndo2fs first, and then restart nagios. If things are ok, you will have this directory structure:
/var/lib/nagios/VOLATILE/
`-- default
|-- AUTH
| |-- HOSTS
| `-- SERVICES
|-- CONTACTGROUPS
| |-- example-admins
.
.
.
| `-- WARNING
| |-- example-gw
| | `-- PING
| `-- example-mail
| `-- Total_Procs
`-- VIEWS
/var/lib/nagios/PERSISTENT/
`-- default
|-- COMMENT
`-- DOWNTIME