[Nagiosplug-help] (Return code of 127 is out of bounds - plugin may be missing)

Grant Lowe glowe at sbcglobal.net
Tue Oct 14 19:42:36 CEST 2008


Hi Justin,

Thanks for the quick response!  At least I'm getting something, although not the desired result.  Now the GUI gives these response:


   Check ROOT Disk Free Space    OK 10-14-2008 10:35:50 0d  0h  4m 30s 1/5 NRPE v2.10  

 Check Remote Mail Queue    OK 10-14-2008 10:38:27 0d  0h  6m 53s 1/5 NRPE v2.10  

 Check Remote Number of Users    OK 10-14-2008 10:39:22 0d  0h  5m 58s 1/5 NRPE v2.10  

 Check Running Processes    OK 10-14-2008 10:35:16 0d  0h  5m  4s 1/5 NRPE v2.10  

 Check Swap Space    OK 10-14-2008 10:37:22 0d  0h  2m 58s 1/5 NRPE v2.10  

 Check USR Disk Free Space    OK 10-14-2008 10:36:48 0d  0h  3m 32s 1/5 NRPE v2.10  

 Check VAR Disk Free Space    OK 10-14-2008 10:37:45 0d  0h  2m 35s 1/5 NRPE v2.10  
So how do I get the data I'm looking for, instead of "NRPE v2.10"?



----- Original Message ----
From: Justin Amburn <justinjoseph24 at hotmail.com>
To: glowe at sbcglobal.net
Cc: andy-lists at networkmail.eu; nagiosplug-help at lists.sourceforge.net
Sent: Tuesday, October 14, 2008 9:11:53 AM
Subject: Re: [Nagiosplug-help] (Return code of 127 is out of bounds - plugin may be missing)

 Grant, try to setup the check so it's not sending any args from nagios 
or looking for any ARGS on the remote host, just so you can troubleshoot 
it. ie.

on nagios server:

$USER1$/check_nrpe -H $HOSTADDRESS$ -c check_disk


Once you get a working response, you can start adding in a few ARGS.

Good luck.

Justin

Grant Lowe wrote:
> Hi Andy,
>
> First, thanks for taking the time to help me.  I really appreciate it!
>
> But it looks like I found something.  The value of $USER1$ in the resource.cfg file is /usr/local/nagios/libexec.  I found that check_nrpe is in /usr/lib/nagios/plugins/check_nrpe. So I made a sym link between the two directories so that nagios can find it. The check_nrpe was also owned by root, so I changed it to be owned by nagios.
>
> I also looked at the commands I'm running in the "View Config" and then click on "Services" in the GUI.  I get this:
>
>
>
>
> Host
> Description
> Max. Check Attempts
> Normal Check Interval
> Retry Check Interal
> Check Command
> Check Period
> Parallelize
> Volatile
> Obsess Over
> Enable Active Checks
> Enable Passive Checks
> Check Freshness
> Freshness Threshold
> Default Contacts/Groups
> Enable Notifications
> Notification Interval
> First Notification Delay
> Notification Options
> Notification Period
> Event Handler
> Enable Event Handler
> Stalking Options
> Enable Flap Detection
> Low Flap Threshold
> High Flap Threshold
> Flap Detection Options
> Process Performance Data
> Enable Failure Prediction
> Failure Prediction Options
> Notes
> Notes URL
> Action URL
> Logo Image
> Image Alt
> Retention Options
> myserver Check ROOT Disk Free Space 5 0h 5m 0s 0h 1m 0s check_nrpe!check_root!20%!10% 
> This is good because it matches what I've got in the services.cfg file: check_command check_nrpe!check_usr!20%!10%
>
>
> Anyway, the GUI now shows "CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error 
> messages."  So why is it the GUI now saying it received 0 bytes?  I did check the remote server logs and that logs says:
>
> Oct 14 08:12:44 myserver nrpe[24750]: [ID 396531 daemon.error] Error: Request contained command arguments, but argument
>  option is not enabled!
> Oct 14 08:12:44 myserver nrpe[24750]: [ID 900267 daemon.error] Client request was invalid, bailing out...
>
> What now?
>
>
>
>
>
> ----- Original Message ----
> From: Andy Shellam 
> To: Grant Lowe 
> Cc: kyle smith ; nagiosplug-help at lists.sourceforge.net
> Sent: Monday, October 13, 2008 10:02:35 AM
> Subject: Re: [Nagiosplug-help] (Return code of 127 is out of bounds - plugin may be missing)
>
> Hi Grant,
>
> Thanks for the reply - what is the value of $USER1$ in Nagios' 
> etc/resource.cfg file?  I'm guessing your other plugins (in the same 
> directory as check_nrpe) work correctly?  One last thing to try, purely 
> for debugging, is to set check_nrpe's owner to nagios (i.e. chown.)
>
> Other than that, I'm stumped.
>
> Andy
>
>
> Grant Lowe wrote:
> 
>> Hi Andy,
>>
>> The "*" just means its an executable file, that's all.  The permissions from /usr all the way down look good. They all have 755 permissions. 
>>
>> Here's the output with the --help switch:
>>
>> [nagios at nagios-test ~]$ /usr/lib/nagios/plugins/check_nrpe --help
>>
>> NRPE Plugin for Nagios
>> Copyright (c) 1999-2007 Ethan Galstad (nagios at nagios.org)
>> Version: 2.7
>> Last Modified: 02-19-2007
>> License: GPL v2 with exemptions (-l for more info)
>> SSL/TLS Available: Anonymous DH Mode, OpenSSL 0.9.6 or higher required
>>
>> Usage: check_nrpe -H  [-n] [-u] [-p ] [-t ] [-c ] [-a ]
>>
>> Options:
>>  -n         = Do no use SSL
>>  -u         = Make socket timeouts return an UNKNOWN state instead of CRITICAL
>>       = The address of the host running the NRPE daemon
>>  [port]     = The port on which the daemon is running (default=5666)
>>  [timeout]  = Number of seconds before connection times out (default=10)
>>  [command]  = The name of the command that the remote daemon should run
>>  [arglist]  = Optional arguments that should be passed to the command.  Multiple
>>               arguments should be separated by a space.  If provided, this must be
>>               the last option supplied on the command line.
>>
>> Note:
>> This plugin requires that you have the NRPE daemon running on the remote host.
>> You must also have configured the daemon to associate a specific plugin command
>> with the [command] option you are specifying here.  Upon receipt of the
>> [command] argument, the NRPE daemon will run the appropriate plugin command and
>> send the plugin output and return code back to *this* plugin.  This allows you
>> to execute plugins on remote hosts and 'fake' the results to make Nagios think
>> the plugin is being run locally.
>>
>> [nagios at nagios-test ~]$
>>
>> Also, here's the output from the nagios GUI of "View Config and Commands""
>>
>> check_nrpe
>> $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ $ARG7$
>>
>> grant
>>
>>
>>
>> ----- Original Message ----
>> From: Andy Shellam 
>> To: Grant Lowe 
>> Cc: kyle smith ; nagiosplug-help at lists.sourceforge.net
>> Sent: Sunday, October 12, 2008 2:05:50 PM
>> Subject: Re: [Nagiosplug-help] (Return code of 127 is out of bounds - plugin may be missing)
>>
>> Hi Grant,
>>
>> There must be some other issue that's causing the return code 127.  I'm 
>> not too familiar with the system you're using - is it Solaris?  Does the 
>> "*" next to check_nrpe in your "ls -l" output mean anything significant?
>>
>> Also what are the permissions on /usr/lib/nagios/plugins and all parent 
>> directories?  What do you get if you "su nagios" (or whatever user your 
>> Nagios system runs as) and do "/usr/lib/nagios/plugins/check_nrpe --help" ?
>>
>> Lastly, from the Nagios interface, select View Config and Commands - 
>> what is your check_nrpe command-line?  If it contains a $USERx$ macro, 
>> what's the value of that macro (in etc/resource.cfg) ?
>>
>> Andy
>>
>> Grant Lowe wrote:
>> 
>> 
>>> Hi Andy,
>>>
>>> Yes, I did those things.  Take a look:
>>>
>>> nagios-test /usr2/glowe> locate check_nrpe
>>> /usr/lib/nagios/plugins/check_nrpe
>>> nagios-test /usr2/glowe> ls -l /usr/lib/nagios/plugins/check_nrpe
>>> -rwxr-xr-x 1 root root 22064 May 16  2007 /usr/lib/nagios/plugins/check_nrpe*
>>> nagios-test /usr2/glowe> 
>>> /opt/csw> ps -ef | grep nrpe
>>>    glowe 12374 11457  0 08:19:53 pts/4    0:00 grep nrpe
>>>   nagios  6411     1  0   Oct 10 ?        0:00 /opt/csw/bin/nrpe -c /opt/csw/etc/nrpe.cfg -d
>>> /opt/csw> 
>>>
>>> Did I miss something?
>>>
>>>
>>>
>>> ----- Original Message ----
>>> From: Andy Shellam 
>>> To: Grant Lowe 
>>> Cc: kyle smith ; nagiosplug-help at lists.sourceforge.net
>>> Sent: Sunday, October 12, 2008 2:35:06 AM
>>> Subject: Re: [Nagiosplug-help] (Return code of 127 is out of bounds - plugin may be missing)
>>>
>>> Grant,
>>>
>>> Have you checked the permissions of check_nrpe on your Nagios host as I 
>>> suggested?  Also when running check_nrpe from the server's console, are 
>>> you running it as the Nagios user?
>>>
>>> Also check that the path to the plugin in Nagios is correct - return 
>>> code 127 means the plugin doesn't exist, or cannot be executed (e.g. 
>>> permissions.)
>>>
>>> Andy
>>>
>>> Grant Lowe wrote:
>>> 
>>> 
>>> 
>>>> I'm wondering if it's my command or service definitions.  Would it be helpful to show what they are?
>>>>
>>>>
>>>> ----- Original Message ----
>>>> From: kyle smith 
>>>> To: Grant Lowe 
>>>> Cc: Andy Shellam ; nagiosplug-help at lists.sourceforge.net
>>>> Sent: Friday, October 10, 2008 3:34:05 PM
>>>> Subject: Re: [Nagiosplug-help] (Return code of 127 is out of bounds - plugin may be missing)
>>>>
>>>> Hey Grant,
>>>>
>>>> If your server and client are the same OS you can just copy that 
>>>> check_nrpe plugin obviously. If not the same version you can download 
>>>> and build it for the client.
>>>>
>>>> That is strange that you can run the check_nrpe plugin from the 
>>>> command line on the server OK but the console is throwing that 
>>>> message. For me if the stuff works in the command line then the 
>>>> console works too (I'm on OSX) so I'm not sure what to say about that.
>>>>
>>>> kyle
>>>>
>>>> On Oct 10, 2008, at 1:53 PM, Grant Lowe wrote:
>>>>
>>>> 
>>>> 
>>>> 
>>>> 
>>>>> Hi Kyle,
>>>>>
>>>>> Except for running check_nrpe on the NRPE client, all the other 
>>>>> tests passed.  I'm still having the problem.  If you have any other 
>>>>> ideas, please send them my way.  Also, if you know of where I can 
>>>>> get the check_nrpe binary, that would be great!
>>>>>
>>>>>
>>>>>
>>>>> ----- Original Message ----
>>>>> From: kyle smith 
>>>>> To: Andy Shellam 
>>>>> Cc: Grant Lowe ; nagiosplug- 
>>>>> help at lists.sourceforge.net
>>>>> Sent: Friday, October 10, 2008 11:09:53 AM
>>>>> Subject: Re: [Nagiosplug-help] (Return code of 127 is out of bounds 
>>>>> - plugin may be missing)
>>>>>
>>>>> Here's what I do when I need to sort out plugin problems. Note that
>>>>> you install the check_nrpe plugin on your clients for testing
>>>>> purposes only. If all these things work then you should be golden!
>>>>>
>>>>> good luck
>>>>>
>>>>> kyle
>>>>>
>>>>> TO TEST CHECK_NRPE COMMANDS
>>>>>
>>>>> ON REMOTE HOST (nagios client)
>>>>>
>>>>> * test check_nrpe plugin
>>>>> hosta:/usr/local/nagios root# libexec/check_nrpe -H localhost
>>>>> NRPE v2.11
>>>>>
>>>>> * test the local plugin you call from your command which you define
>>>>> in nrpe.cfg
>>>>> hosta:/usr/local/nagios root# /usr/local/nagios/libexec/check_disk -w
>>>>> 50% -c 5% -p /dev/disk0s9
>>>>> DISK OK - free space: / 48578 MB (85% inode=84%);| /=8412MB;
>>>>> 28620;54378;0;57241
>>>>>
>>>>> * test command defined in nrpe.cfg by running via check_nrpe plugin
>>>>> (installed for test purposes only)
>>>>> hosta:/usr/local/nagios root# libexec/check_nrpe -H localhost -c
>>>>> check_disk_hosta
>>>>> DISK OK - free space: / 48578 MB (85% inode=84%);| /=8412MB;
>>>>> 28620;54378;0;57241
>>>>>
>>>>> ON NAGIOS SERVER
>>>>> * check the nrpe daemon on remote host
>>>>> hostb:/usr/local/nagios root# libexec/check_nrpe -H hosta_ip_address
>>>>> NRPE v2.11
>>>>>
>>>>> * check the newly setup command via check_nrpe plugin
>>>>> hostb:/usr/local/nagios root# libexec/check_nrpe -H hosta_ip_address -
>>>>> c check_disk_hosta
>>>>>
>>>>>
>>>>> On Oct 10, 2008, at 9:55 AM, Andy Shellam wrote:
>>>>>
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>>> Hi Grant,
>>>>>>
>>>>>> It's possible it may be the check_nrpe plugin on the Nagios host
>>>>>> that is
>>>>>> having trouble - i.e. what are the permissions on
>>>>>> /usr/local/nagios/libexec/check_nrpe (replace /usr/local/nagios
>>>>>> with the
>>>>>> actual path to the plugins on your Nagios server.)
>>>>>>
>>>>>>  From my own experience, when the error is on the NRPE-host side of
>>>>>> things, Nagios returns the status as "unknown."
>>>>>>
>>>>>> Andy
>>>>>>
>>>>>> Grant Lowe wrote:
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>>> Hi All,
>>>>>>>
>>>>>>> Since I've had such good luck with you guys, I thought I would ask
>>>>>>> for some more help :-).  Anyway, I'm getting this message
>>>>>>> "(Return code of 127 is out of bounds - plugin may be missing)."
>>>>>>> The plugins aren't missing:
>>>>>>>
>>>>>>> myhost /tmp> ls -l /opt/csw/libexec/nagios-plugins/check_swap /opt/
>>>>>>> csw/libexec/nagios-plugins/check_mailq
>>>>>>> -rwxr-xr-x   1 root     bin        20371 Oct  9 12:46 /opt/csw/
>>>>>>> libexec/nagios-plugins/check_mailq*
>>>>>>> -rwxr-xr-x   1 root     bin        61364 Jan  4  2008 /opt/csw/
>>>>>>> libexec/nagios-plugins/check_swap*
>>>>>>> myhost /tmp>
>>>>>>>
>>>>>>>
>>>>>>> I've searched google and found similar problems and their
>>>>>>> solutions, but nothing seems to work.  This is rather puzzling
>>>>>>> because, if I run the command from the command line from the
>>>>>>> Nagios host, I get good information back from the NRPE host.  But
>>>>>>> I get this error in the GUI.  I get this error for two different
>>>>>>> commands.  Here are the commands I'm checking in nrpe.cfg
>>>>>>>
>>>>>>> command[check_swap]=/opt/csw/libexec/nagios-plugins/check_swap -w
>>>>>>> 85 -c 75
>>>>>>> command[check_mailq]= /opt/csw/libexec/nagios-plugins/check_mailq -
>>>>>>> w 90 -c 95
>>>>>>>
>>>>>>> Any and all help is appreciated.
>>>>>>>
>>>>>>> -------------------------------------------------------------------- 
>>>>>>> -
>>>>>>> ----
>>>>>>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>>>>>>> challenge
>>>>>>> Build the coolest Linux based applications with Moblin SDK & win
>>>>>>> great prizes
>>>>>>> Grand prize is a trip for two to an Open Source event anywhere in
>>>>>>> the world
>>>>>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>>>>>> _______________________________________________
>>>>>>> Nagiosplug-help mailing list
>>>>>>> Nagiosplug-help at lists.sourceforge.net
>>>>>>> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
>>>>>>> ::: Please include plugins version (-v) and OS when reporting any
>>>>>>> issue.
>>>>>>> ::: Messages without supporting info will risk being sent to /dev/
>>>>>>> null
>>>>>>>
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>> --------------------------------------------------------------------- 
>>>>>> -
>>>>>> ---
>>>>>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>>>>>> challenge
>>>>>> Build the coolest Linux based applications with Moblin SDK & win
>>>>>> great prizes
>>>>>> Grand prize is a trip for two to an Open Source event anywhere in
>>>>>> the world
>>>>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>>>>> _______________________________________________
>>>>>> Nagiosplug-help mailing list
>>>>>> Nagiosplug-help at lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
>>>>>> ::: Please include plugins version (-v) and OS when reporting any
>>>>>> issue.
>>>>>> ::: Messages without supporting info will risk being sent to /dev/ 
>>>>>> null
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>> 
>>> 
>>> 
>> 
>> 
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Nagiosplug-help mailing list
> Nagiosplug-help at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
> ::: Please include plugins version (-v) and OS when reporting any issue. 
> ::: Messages without supporting info will risk being sent to /dev/null
>
>
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20081014/d0d73f3f/attachment.html>


More information about the Help mailing list