Nagios & NagVis MySQL Troubleshooting (ndomod & ndo2db)

UPDATE Check out OMD for an RPM based, easy to install and update variant of Nagios which includes other utilities as well. This will save a tremendous amount of time to deployment.

Recently I setup a Nagios box to monitor an organization’s network and network services.  Nagios is extremely flexible and can poll pretty much any network connected device by configuring service checks.  The service checks are like plugins and can poll devices via SNMP, Ping, HTTP, etc.  You can even write your own service check plugins using Perl scripts.

NagVis mates with Nagios to provide an enhanced graphical map of the network, services and their current status.  NDOMOD writes Nagios data to a Unix or TCP socket (data sink), and  NDO2DB catches this data and writes it into a MySQL database.  NagVis can then be configured to use MySQL as a backend.

When implementing the NDOMOD and NDO2DB plugins, I received the error “NDOMOD: Could not open data sink!”.  First I verified the plugin configuration files.  Then I began checking permissions which narrowed the error down to ownership and permissions of the plugin configuration files ndo2db and ndomod located at /usr/local/nagios/etc/

The resolution was to to give ownership and proper permissions to the nagios user and group as follows:

  • cd /usr/local/nagios/etc/
  • chown nagios:nagios ndo2db.cfg ndomod.cfg
  • chmod 664 ndo2db.cfg ndomod.cfg

While searching for this error, I found many topics where people reinstalled and it worked fine.  Permissions are a common misconfiguration which result in errors on *nix systems.  Remember to check permissions using ls -lah during any installation/configuration/troubleshooting process.   Hopefully this will be of help to others.


2 thoughts on “Nagios & NagVis MySQL Troubleshooting (ndomod & ndo2db)

    1. If I was you, I would look into Open Monitoring Distribution. It allows a completely package-based, automated installation of all components and dependencies. I’ve found other alternatives (even Centreon) to be easily broken by updates and such.

Leave a Reply to Brian Dwyer Cancel reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s