> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:nagios-users- > [EMAIL PROTECTED] On Behalf Of Robert Fitzpatrick > Sent: Thursday, November 09, 2006 10:01 AM > To: Nagios > Subject: [Nagios-users] check_by_ssh > > Trying to use check_by_ssh and can't seem to get the -C argument right. > I am getting a WARNING with this: > > Bad escape character ' 60 -F /var/spool/nagios/nagios.log -C > /usr/local/bin/nagios' > > This is the way I have my checkcommand and service setup, I tried > without the single quotes and it gave me an UNKNOWN error. I also tried > breaking the check_by_ssh arguments up into three checkcommand arguments > and tried passing three different arguments with the service, no help. > > # 'check_by_ssh' command definition > define command{ > command_name check_by_ssh > command_line $USER1$/check_by_ssh -H $HOSTADDRESS$ -C '$ARG1$' > } > > define service{ > use generic-service > hostgroup_name nagios-servers > service_description NAGIOS > contact_groups admins > check_command check_by_ssh!-e 60 -F > /var/spool/nagios/nagios.log -C/usr/local/bin/nagios > } > > When I run from the command line, all works. This is the first time I've > tried to use check_by_ssh, would appreciate some guidance.
You must be running something different from the command line as the above could never work. Check_by_ssh is expecting -C to be a full path and command to run on a remote host. I'm doing the same kind of thing with -- define command { command_name check_nagios command_line $USER1$/check_by_ssh -H $HOSTADDRESS$ -C "/usr/local/nagios/libexec/check_nagios /usr/local/nagios/var/status.dat 5 'bin/nagios'" } You're telling it to run the command "-e 60 -F ..." on the remote host which isn't valid and since it starts with '-e' that check_by_ssh is going to interpret that as an option to itself. HTH -- Marc ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Nagios-users mailing list Nagios-users@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