Using SSH to run remote command checks

Mark.Law at thomson.com Mark.Law at thomson.com
Thu Dec 22 15:45:41 CET 2005


I tested the following command from the command line ~

/usr/bin/ssh -l nagios host1 chkAdminServer.pl

and it returns OK with an exit code of 0.  Great.

When I put it into the following service definition, I get a Status
UNKNOWN with STATUS INFORMATION (No Output)

define service{
  name                            check_adminserver
  service_description             AdminServer
  use                             hg.prod.check_5min
  host                            host1,host2
  contact_groups                  systemgrp
  check_command
check_command_ssh!/path/to/perl/script/bin/chkAdminServer.pl!
}

The check command definition is really simple also ~

define command{
  command_name    check_command_ssh
  command_line    /usr/bin/ssh -l nagios $HOSTADDRESS$ $ARG1$
}

I have checked permissions, log files, verified public keys on the
remote server, everything I can think of - but it continues to fail.  In
fact, it appears that the command isn't even attempting to run.   Any
ideas?




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
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