check_by_ssh commands
Carroll, Jim P [Contractor]
jcarro10 at sprintspectrum.com
Thu May 22 17:24:26 CEST 2003
I'm glad you got it working.
However, based on what you pasted to the list, it appears
you didn't have a closing quotation mark. That would
definitely create the symptom you were witnessing. ;)
jc
> -----Original Message-----
> From: Brad Dunn [mailto:Brad at pretzel.com.au]
> Sent: Wednesday, May 21, 2003 10:47 PM
> To: Brad Dunn; 'nagios-users at lists.sourceforge.net'
> Subject: [Nagios-users] RE: check_by_ssh commands
>
>
> Sorry, I realise I just needed the -l switch on the
> ./check_by_ssh command
> as well. My mistake.
>
> Brad
>
> -----Original Message-----
> From: Brad Dunn
> Sent: Thursday, 22 May 2003 11:33 AM
> To: 'nagios-users at lists.sourceforge.net'
> Subject: 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