Offloading Nagios XI DB

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
jbennett
Posts: 522
Joined: Mon Apr 16, 2012 3:00 pm

Re: Offloading Nagios XI DB

Post 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?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Offloading Nagios XI DB

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