Installing the ndo2fs addon

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.

Compile

cd /src-folder
./configure --prefix=/usr
make install
make install-init

Edit the program file

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",
...

Edit the initscript

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
...

Configure the ndomod

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
...

Test

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
nagios/installing_the_ndo2fs_addon.txt · Last modified: 2010-05-13 17:12 by admin
Back to top
GNU Free Documentation License 1.3
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0