Check_by_ssh plugin (nagios users)

Hi Everyone,

I need help from the nagios users out there. I have setup a new service using the check_by_ssh plugin and is executing the script on the remote server but I wonder what am I missing because is not picking up the returning values of my script. Basically the script on the remote host has these two conditions at the end:

if [[ $MAXRC -eq 1 ]]; then
exit 2
else
exit 0
fi

The same script is working currently using the nrpe plugin. Thanks for your help in advance.

The return value = exit return code is more fragile and less often honored than a text i/o response. Some part of the ssh chain is returning its own status rather than the script status. Change to a text validation.

1 Like