On Mon, Jun 10, 2013 at 09:27:21PM +0000, MAHONEY, DANIEL wrote:

> 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

exit status 127 often means that "exec" failed - it wasn't able to
find the program/script specified.  That could be that "check_by_ssh"
was missing, or that CheckRaid.sh was missing, or that CheckRaid.sh
exited 127 because one of its commands was missing, perhaps because
PATH wasn't set as intended, probably missing /usr/local/s?bin or
such (I'm wagering it's that).

Your message was truncated, but if further debugging is needed, I'd
recommend using strace or sh -x to see what command isn't being found.

You could do something like:
/usr/local/nagios/libexec/check_by_ssh -H <remote server IP> -l nagios -i 
/home/nagios/.ssh/id_rsa -E -o StrictHostKeyChecking=no -C 'sh -x 
/home/nagios/checkRAID.sh 2>nagios.err'

Or:
/usr/local/nagios/libexec/check_by_ssh -H <remote server IP> -l nagios -i 
/home/nagios/.ssh/id_rsa -E -o StrictHostKeyChecking=no -C 'strace -e execve 
/home/nagios/checkRAID.sh 2>nagios.err'

BTW, using "su" to "become" a role account is typically unneeded, and
(I find) ugly.  You can almost always use sudo -H -u nagios ...
That works even if the account is locked/disabled/noshell/etc.

Justin

------------------------------------------------------------------------------
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@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

Reply via email to