Still having check_by_ssh problems

Dave Viner dviner at yahoo-inc.com
Mon Jan 6 17:54:47 CET 2003


one thought might be to change your command definitions from what you have:
 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$"
         }

to something that isn't user specific.  That is, the ~ will be ~nagios/ when
nagios runs the command (or whatever user you have configured Nagios to run
as), and ~blair/ when you run it.  Probably better to say something like:

 define command{
         command_name    check_remote_mem
         command_line    $USER1$/check_by_ssh -f -l sysadmin
 -H $HOSTADDRESS$ -C "/home/blair/plugins/check_mem.pl -u -w $ARG1$ -c
$ARG2$"
         }

that way, you can be guarenteed of which executable is running.

this might not be the problem, but i thought i'd make the suggestion anyway.

dave


-----Original Message-----
From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net]On Behalf Of
Volker.Aust at premiere.de
Sent: Monday, January 06, 2003 8:07 AM
To: nagios-users at lists.sourceforge.net
Cc: brampling at methanex.com
Subject: RE: [Nagios-users] Still having check_by_ssh problems


This is what I get when I execute from the Nagios host as nagios user a
remote check_disk:

$ ./libexec13b2/check_by_ssh -H w.x.y.z -l nagios -i
/usr/local/nagios/.ssh/id_rsa -C /usr/local/nagios/libexec/check_disk -w 80%
-c 70% -m -p /export/home
DISK CRITICAL - [10421765 kB (64%) free on /export/home]
$ echo $?
2

What is the result when you call your checks as nagios user from your nagios
host from the command line? Can you send an example?

-vol

> -----Original Message-----
> From: Blair Rampling [mailto:brampling at methanex.com]
> Sent: Friday, January 03, 2003 10:40 PM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] Still having check_by_ssh problems
>
>
> I am still having the problem described below. The plugin is
> returining 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$"
>         }
>
>
> - --
> Blair Rampling
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://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:ThinkGeek
Welcome to geek heaven.
http://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:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf




More information about the Users mailing list