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

Gantz Alex gantz.alex at gmail.com
Tue Jun 11 23:27:27 CEST 2013


Hello!

Try to use this command_line:

    command_line    $USER1$/check_by_ssh -H $HOSTNAME -l nagios -i
/home/nagios/.ssh/id_rsa -E -o StrictHostKeyChecking=no -C
/home/nagios/checkRAID.sh****
where $USER1$ variable is set in resource.cfg file


2013/6/11 MAHONEY, DANIEL <dm572j at att.com>

>  Send to nagios-users at lists.sourceforge.net****
>
> ** **
>
> Greetings, all. I’ve googled the subject above and evaluated the answers
> I’ve found but haven’t yet found info that pinpoints my issue.****
>
> ** **
>
> I’m running Nagios Core 3.2.1 on RedHat 5.8. This installation has been
> running for a few years, I just inherited it’s care and maintenance
> recently. On one of my monitored servers I write a script “checkRAID.sh”
> that calls another piece of code, looks at the results, and returns either
> a 0 or a 2 (the result will always be either good or critical, depending on
> whether the RAID controller is unhappy).****
>
> ** **
>
> Nagios runs as user “nagios”. The remote machine is configured to allow
> user “nagios” to log in without a password, using a key pair. This works.*
> ***
>
> ** **
>
> In /usr/local/nagios/etc/checkcommands.cfg I have :****
>
> define command{****
>
>     command_name    check_raid****
>
>     command_line    /usr/local/nagios/libexec/check_by_ssh -H $HOSTNAME -l
> nagios -i /home/nagios/.ssh/id_rsa -E -o StrictHostKeyChecking=no -C
> /home/nagios/checkRAID.sh****
>
> }****
>
> ** **
>
> When I become nagios (“su – nagios”) and run that script, I get:****
>
> [nagios at nagios ~]$ /usr/local/nagios/libexec/check_by_ssh -H <remote
> server IP> -l nagios -i /home/nagios/.ssh/id_rsa -E -o
> StrictHostKeyChecking=no -C /home/nagios/checkRAID.sh****
>
> Check failed****
>
> [nagios at nagios ~]$ echo $?****
>
> 2****
>
> [nagios at nagios ~]$****
>
> ** **
>
> That “Check failed” line is what’s written to stdout just before returning
> an exit code of 2. This shows me that the remote script is working fine,
> and that the local nagios user is able to execute it with no problems.
> However, once I add an entry to services.cfg to tie this service check to
> my remote host and give it time to run the command, when I look at nagios’
> “Services” page it shows :****
>
>                 ****
>
> check_raid          CRITICAL              06-10-2013 21:17:25        0d 6h
> 14m 29s    3/3         (Return code of 127 is out of bounds - plugin may be
> missing)****
>
> ** **
>
> This has me baffled. The return code is quite clearly 2. ** **
>
> ** **
>
> I recently set debug_level to -1 and restarted. I’m hoping that the debug
> log will ****
>
> ** **
>
> Daniel Mahoney****
>
> Dm572j at att.com****
>
> ** **
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin 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-lists.org/archive/users/attachments/20130612/2baed721/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list