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

Gantz Alex <[email protected]>
Newsgroups gmane.network.nagios.user
Message-ID <CAHmsv9Hqc3tRy0EG6y3a5qzF7vzvddGH2bxG=H5QCqo-msBOLA@mail.gmail.com>
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 <[email protected]>

>  Send to [email protected]****
>
> ** **
>
> 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@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@nagios ~]$ echo $?****
>
> 2****
>
> [nagios@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****
>
> [email protected]****
>
> ** **
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Nagios-users mailing list
> [email protected]
> 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
>

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev

_______________________________________________
Nagios-users mailing list
[email protected]
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.