check_by_ssh always returning OK

Jason Dixon jasondixon at myrealbox.com
Fri Dec 20 20:11:00 CET 2002


If I could, I'd like to suggest a few plugins I recently completed and
uploaded as patches to the sourceforge site.  One of them is OpenBSD/PF
specific, so I won't mention it here.

The other two are check_cpu and check_df.  Both connect via ssh, but the
check is actually performed on the output, not the success/failure of
the ssh connection.  Check_cpu, for example, gathers/checks cpu load
averages.  Check_df gathers df output and checks the free percentage.

The advantage over some of the other plugins is that they don't require
monitoring facilities *on* the target machine.  Rather, they use the
native 'w' and 'df' utilities.  Obviously, this is only relevant to *NIX
boxen.

Hope these are of some remote use to others, as they have been to me. 
:)

-J.

On Fri, 2002-12-20 at 13:51, Blair Rampling wrote:
> 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 1 of the plugins and nagios 1.0b6. 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. Note that if I omit the -f the checks will always return UNKNOWN:
> 
> # '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$"
>         }
> 
> - --
> Blair Rampling
> 
> 
> 
> -------------------------------------------------------
> This SF.NET email is sponsored by:  The Best Geek Holiday Gifts!
> Time is running out!  Thinkgeek.com has the coolest gifts for
> your favorite geek.   Let your fingers do the typing.   Visit Now.
> T H I N K G E E K . C O M        http://www.thinkgeek.com/sf/
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> 




-------------------------------------------------------
This SF.NET email is sponsored by:  The Best Geek Holiday Gifts!
Time is running out!  Thinkgeek.com has the coolest gifts for
your favorite geek.   Let your fingers do the typing.   Visit Now.
T H I N K G E E K . C O M        http://www.thinkgeek.com/sf/




More information about the Users mailing list