Page 3 of 3

Re: Offloading Nagios XI DB

Posted: Tue Oct 08, 2013 2:26 pm
by jbennett
OK - I now have Nagios running with an offloaded DB. However, I'm getting a bunch of Code 126 & 127 on hosts and serice checks.

For hosts: Return code of 126 is out of bounds - plugin may be missing

For services: Return code of 127 is out of bounds - plugin may be missing

For the hosts, the check is 'check_icmp' and appears to have the same permissions on both servers (live & test):

-r-sr-xr-x 1 root root 155406 Jun 11 10:43 check_icmp

When I run the test from the CCM and from the command line I get no return but when I run it from the command line I get an indication that I need to recompile the plug-ins. I realized that perhaps I hadn't run the script to update the components for the 32-bit system I'm running on now (compared to the 64-bit I copied the data from). I went back to the 'Backing up and restoring' document and followed the section under 'Things to Consider'. Upon running the ./A-subcomponents script, I get the following:

Code: Select all

NOTE: If prompted, enter the MySQL root password
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
ERROR: Subcomponent 'ndoutils' installation failed - exiting.
Subcomponents installation failed - exiting
Which makes sense being that I've already offloaded the DB to a remote server and mysql is no longer running on the Nagios box.

Where can I change where this script is lookingf ro the DB?

Re: Offloading Nagios XI DB

Posted: Tue Oct 08, 2013 4:46 pm
by slansing
Looks like your plugins have incorrect permissions please run the following:

Code: Select all

chown nagios:nagios /usr/local/nagios/libexec/check*
Some plugins may require slightly different permissions but we can fix those individually if they start returning out of bounds.