check_by_ssh commands
Jamie Baddeley
jamie.baddeley at vpc.co.nz
Thu May 22 06:53:44 CEST 2003
what is the -p / arg?
that'll be what's doing it.
get rid of that and make woody/sarge/sid sing.
jamie
----- Original Message -----
From: "Brad Dunn" <Brad at pretzel.com.au>
To: <nagios-users at lists.sourceforge.net>
Sent: Thursday, May 22, 2003 3:33 PM
Subject: [Nagios-users] check_by_ssh commands
> Hi there, I'm running Nagios on a Debian Linux machine and am just started
> to setup some checks using the "check_by_ssh" and have run into a bit of
a
> problem. to make things easier I've got HOSTA and HOSTB. I've setup all
the
> SSH public keys etc so that HOSTA (the nagios server) Can login to HOSTB
> without the password and only using the public keys etc . In this case a
> check_disk over check_by_ssh. It logs in no worries.
>
>
> This is how it works when I just try to SSH from HOSTA to HOSTB
> debian:~# ssh -l nagios HOSTB
> It then displays me with the MOTD
>
> however my problem arrises when I try to either run the command manually
> from the libexec directory.
> ./check_by_ssh -H HOSTB -C './check_disk -w 30% -c 10% -p /
> it just sits at a prompt like so
> >
>
>
> Now I'm assuming now that I think about it, the reason its probably not
> working, is because when I try running it manually, I'm not specifying the
> user nagios on my remote machine, so the check_ssh its trying to ssh as
root
> and thus getting prompted for the password. How exactly do I do a
check_ssh
> and specify the user at the same time?
>
>
>
> also I noticed that within nagios itself, if the checks are all just
> running, this particular check displays
> Check Disk SSH WARNING22-05-2003 18:41:340d 0h 38m 59s4/4Permission
> denied, please try again.
>
> This is my checkcommands.cfg
>
> # 'check_disk_ssh' command definition
> define command{
> command_name check_disk_ssh
> command_line $USER1$/check_by_ssh -H $HOSTADDRESS$ -C
> './check_disk -w $ARG1$ -c $ARG2$ -p /'
> }
>
>
> And this is my services.cfg
> # Service definition
> define service{
> use generic-service ; Name of
> service template to use
>
> host_name HOSTB
> service_description Check Disk SSH
> is_volatile 0
> check_period 24x7
> max_check_attempts 4
> normal_check_interval 1
> retry_check_interval 1
> contact_groups linux-admins
> notification_interval 960
> notification_period 24x7
> notification_options c,r
> check_command check_disk_ssh!75%!85%
> }
>
> Thanks
>
> -Brad
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: ObjectStore.
> If flattening out C++ or Java code to make your application fit in a
> relational database is painful, don't do it! Check out ObjectStore.
> Now part of Progress Software. http://www.objectstore.net/sourceforge
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at 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
>
-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
_______________________________________________
Nagios-users mailing list
Nagios-users at 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
More information about the Users
mailing list