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


#1

When i checked nagios from web interface
first time, its giving the following error. "return code of 127
is out of bounds plugin may be missing
03-11-2008 20:02:44] Warning: Return code of 127 for check of host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
[03-11-2008 20:02:34] Warning: Return code of 127 for check of service ‘Root Partition’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
[03-11-2008 20:02:34] Warning: Return code of 127 for check of service ‘SSH’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
[03-11-2008 20:01:14] Warning: Return code of 127 for check of service ‘PING’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
[03-11-2008 20:00:44] Warning: Return code of 127 for check of service ‘HTTP’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
[03-11-2008 20:00:04] Warning: Return code of 127 for check of service ‘Current Users’ on host ‘localhost’ was out of bounds. Make sure the plugin you’re trying to run actually exists.

can anyone help me how to solve this problem…i am a newbie so plese explain in detail so that i can solve this problem asap.

{e_FILE}public/1205247243_10240_FT0_screenshot.png

#2

Are you sure you installed the nagios plugin correctly? Have you ran the following commands already:

./configure
make
make install

Also, have you downloaded and compiled the plugin?

[EDIT]

Make sure you run these commands in the previously compiled folder of the plugin.


#3

thanks geo for the quick reply.i am using nagios-3.0rc3 and i have installed nagios-plugins-1.4.11 using these commands

root@:~/tmp/nagios/nagiosplug-1.3-beta1# ./configure
–prefix=/usr/local/nagios --with-nagios-user=nagios --with-nagios-group=nagios

root@i:~/tmp/nagios/nagiosplug-1.3-beta1# make all
root@ducati:~/tmp/nagios/nagiosplug-1.3-beta1# make install

but i cant find the plugins installed in this folder
/usr/local/nagios/libexec

and still i am getting the same error…please help me…


#4

First, are you using windows or linux? And second, have you compiled btoh nagios and the nagios plugin under the same directory (or example: /opt)? And make sure that you set the group and owner of the nagios plugins files to “nagios”? Do a “ls -al” to see what the current group and owner are. Also, check the permissions for the files in the nagios plug-in directory. That might also be a problem. Nagios might not have the proper permissions to access the files it needs.

gxr


#5

thanks a lot man…my problem is solved…the problem was bcoz the plugin was not properly installed in /usr/local/nagios/libexec
…now i am facing few more problems

  1. When a host is down i am not getting alert.we are using exchange.
  2. i am getting a Error: Could not open command file '/usr/local/nagios/var/rw/nagios.cmd.i did according to the steps which is mentioned below
    chown nagios.nagios /usr/local/nagios/var/rw
    chmod u+rwx /usr/local/nagios/var/rw
    chmod g+rwx /usr/local/nagios/var/rw
    chmod g+s /usr/local/nagios/var/rw

i have logged in a root and there is one more user called nagios.even if i delete the nagios.cmd file its again created with the same permission.

  1. In /usr/local/nagios/var/nagios.log i am getting a error msg which s mentioned below

[1205416102] SERVICE NOTIFICATION: nagiosadmin;dev-sudhesh;Memory Usage;CRITICAL;notify-service-by-email;Connection refused
[1205416102] SERVICE NOTIFICATION: nagiosadmin;dev-sudhesh;C:\ Drive Space;CRITICAL;notify-service-by-email;Connection refused
[1205416152] Warning: Return code of 127 for check of service ‘Printer Status’ on host ‘hplj2605dn’ was out of bounds. Make sure the plugin you’re trying to run actually exists.
[1205416152] HOST NOTIFICATION: nagiosadmin;hplj2605dn;DOWN;notify-host-by-email;(Host Check Timed Out)


#6

should i need to change anything on commands.cfg and contacts.cfg.if yes can u please explain in detail as how to do.

this is my contacts.cfg file
define contact{
contact_name nagiosadmin
use generic-contact
alias sudheshpn
email sudheshpn@mydomain.com
}

define contactgroup{
contactgroup_name admins
alias Nagios Administrators
members nagiosadmin;nagios;sudheshpn


#7

chown nagios.nagcmd /usr/local/nagios/var/rw

it should look like this:
drwxrwsr-x 2 nagios nagcmd 4096 Mar 11 12:59 rw


#8

thanks man i am getting a output as
drwxrws— 2 nagios nagioscmd 4096 Mar 14 13:54 /usr/local/nagios/var/rw/


#9

prw-rw---- 1 nagios nagioscmd 0 Mar 14 13:54 nagios.cmd
is the permission of nagios.cmd


#10

Good stuff. I assume that your nagioscmd group contains the apache and nagios user…
As far as the sending of mail goes, do you maybe need to configure sendmail?


#11

yes i have installed postfix in my machine and i need to configure notification…thanks a lot for help


#12

i am getting a error like this now

Warning: Attempting to execute the command “/usr/bin/printf “%b” “***** Nagios ***\n\nNotification Type: PROBLEM\n\nService: Root Partition\nHost: localhost\nAddress: 192.168.142.119\nState: CRITICAL\n\nDate/Time: Fri Mar 14 18:06:23 IST 2008\n\nAdditional Info:\n\nDISK CRITICAL - free space: / 231 MB (8% inode=75%):" | /usr/bin/mail -s " PROBLEM Service Alert: localhost/Root Partition is CRITICAL **” sudheshpn@mydomain.com” resulted in a return code of 127. Make sure the script or binary you are trying to execute actually exists…


#13

i have installed sendmail.i need the error logs from the nagios to be routed to my exchange server email id…for that wht all configuration i should do…please help me


#14

From memory I edited sendmail.mc to define my SMART_HOST as the exchange server address and then changed some settings for MASQUERADE_AS to be my.domain.com. Then I believe I used m4 to recreate the sendmail.cf configuration file… although I can’t remember the syntax. Sorry I can’t be any more specific, I have no real clue with sendmail I’m afraid, I was working from little a guide I found on the web somewhere and the link now eludes me… Hopefully someone else can fill in the blanks for you, or at least point you to a useful quickstart guide for sendmail.

HTH

/S