Pages

Wednesday, January 23, 2013

Nagios "Return Code of 127 is out of bounds - plugin may be missing"


For this tutorial I assume you've installed Nagios. I suggest you install Nagios using the script from  

http://systemadministratorrecipes.blogspot.com/2012/06/scripts-nagios-for-install-on-ubuntu.html 

After installing Nagios. Start it and you will receive the following error:

 "Return code of 127 is out of bounds - plugin may be missing"

 To fix this error follow these instructions:

Step 1 

Checks that Nagios plugins are installed correctly in the "libexec"
  1. Open "bash-Konsole", and type "sudo su" without quotes, then press Enter key.
  2. Type the administrator password.
  3. Type "cd /usr/local/nagios/libexec" without quotes, and press Enter key.
  4. Type "dir" without quotes, then press Enter key 
 This command should show you Nagios plugins installed. If the folder is empty performs Step 2

Step 2

Let's copy the plugins installed in "/ usr / lib / nagios / plugings" to "/ usr / local / nagios / libexec"
  1. In the open "bash-Konsole", type "mv /usr/lib/nagios/plugins/* /usr/local/nagios/libexec" without quotes, then press Enter key.
  2. Type "sudo /etc/init.d/nagios restart" without quotes, then press Enter key.
Now open browser type http://localhost/nagios and log in.

After that, Nagios start working properly ;)