[Nagiosplug-help] RE: Still having check_by_ssh problems

Meg Denham Meg.Denham at alphawest.com.au
Thu Jul 31 21:11:15 CEST 2003


I've been looking for a solution to this problem, and I think I have it.  The problem is not so much with check_by_ssh as with the ssh command itself.  If the ssh command returns 0 from the remote machine, that's what check_by_ssh sees.  I had some trouble using check_by_ssh with another perl script called authprogs running the ssh command on the remote machine, which always returned a 0 exit status.  When I fixed authprogs on the remote machine to return the true plugin return code, then the check_by_ssh return code was correct too.

Meg.

>  Still having check_by_ssh problems   
> 2003-03-19 20:33 
> 
>  This is an old post.  Is there a solution to this as I am experiencing the same issue.
>  
>  "
>  
>   I am still having the problem described below. The plugin is returning an exit code of 2
>  when it is run locally, but check_by_ssh is returning an exit code of 0. Does nobody else
>  have this problem? Perhaps I am overlooking something obvious.
>   
>   
>   I have a number of things monitored by check_by_ssh. Even when the remote plugin exits
> with
>  an error code other than 0, nagios shows OK leading me to believe that check_by_ssh is
>  returning error code 0 regardless. I am using 1.3 beta 2 of the plugins and nagios 1.0. Why
>  is this happening and how do I fix it? Thanks.
>   
>   Here are two examples of checks that are returning OK when they shouldn't:
>   
>   # 'check_remote_mem' command definition
>   define command{
>           command_name    check_remote_mem
>           command_line    $USER1$/check_by_ssh -f -l sysadmin -H $HOSTADDRESS$ -C
>  "~/plugins/check_mem.pl -u -w $ARG1$ -c $ARG2$"
>           }
>   
>   # 'check_remote_ps_proc' command definition
>   define command{
>           command_name    check_remote_ps_proc
>           command_line    $USER1$/check_by_ssh -f -l sysadmin -H $HOSTADDRESS$ -C
>  "~/plugins/check_psproc.pl $ARG1$ $ARG2$"
>           }
>  "
>  
>   
>  
>  
>  
>  Zander Strachan
>  Unix Systems Engineer
>  
> 

Alphawest Disclaimer

---------------------------------------------------------------------------
If this communication is not intended for you and you are not an authorised
recipient of this email you are prohibited by law from dealing with or
relying on the email or any file attachments. This prohibition includes
reading, printing, copying, re-transmitting, disseminating, storing or in
any other way dealing or acting in reliance on the information.
If you have received this email in error, we request you contact Alphawest 
immediately by returning the email to postmaster at alphawest.com.au and
destroy the original. This email is confidential and may contain privileged
client information. Alphawest  has taken reasonable steps to ensure the
accuracy and integrity of all its communications, including electronic
communications, but accepts no liability for materials transmitted.
---------------------------------------------------------------------------




More information about the Help mailing list