Date: Mon, 14 Jul 2008 13:23:43 +0000 (GMT) From: Car Laza <carlaza@rocketmail.com> To: freebsd-questions@freebsd.org Subject: Nagios - check_by_ssh problem Message-ID: <939463.15027.qm@web28209.mail.ukl.yahoo.com>
next in thread | raw e-mail | index | archive | help
Hello,=0A=0ASummary: running check_by_ssh command, but it is still failing.= =0A=0A=0AI'm not subscribed to this list, so please include my address expl= icitly in your replies. :)=0A=0A=0AOS: FreeBSD 7.0-STABLE=0A=0Agrep nag /et= c/passwd =0Anagios:*:181:181:Nagios pseudo-user:/var/spool/nagios:/usr/sbin= /nologin=0A=0ACommand being run as root:=0A=0Asu -m nagios -c "/usr/local/l= ibexec/nagios/check_by_ssh -t 60 -l nagios -H bifllive.stellatravel.co.uk -= C /usr/nagios/bin/check-ati.sh -i /var/spool/nagios/boxlive.ssh-key"=0A=0A= =0Adefine command {=0A command_name check_by_ssh=0A command_l= ine $USER1$/check_by_ssh -H $HOSTADDRESS$ -t $ARG1$ -l $ARG2$ -C $ARG3$ -i = $ARG4$=0A }=0A=0Adefine service{=0A use = generic-service=0A name ATI check= =0A service_description ATI feed=0A check_command= check_by_ssh!60!nagios!/usr/nagios/bin/check-ati.sh!/var= /spool/nagios/boxlive.ssh-key=0A host_name boxlive=0A = normal_check_interval 5 ; Check the service every 5 minutes = under normal conditions=0A retry_check_interval 1 ; Re-chec= k the service every minute until its final/hard state is determine=0A = notification_options c,r=0A }=0A=0A=0A/var/spool/nagios is owne= d by nagios user, see:=0A=0A=0A[root@nagios /var/spool/nagios]# ls -la .ssh= =0Atotal 6=0Adrwx------ 2 nagios nagios 512 Jul 14 13:32 .=0Adrwxrwxr-x = 6 nagios nagios 512 Jul 14 14:01 ..=0A-rw-r--r-- 1 nagios nagios 617 = Jul 14 13:32 known_hosts=0A=0A=0Aboxlive.ssh-key was generated by me, and i= t works.=0A=0AWhen running this command, as above, it works perfectly, yet = when running from nagios, as a service check, I get: =0A=0ARemote command e= xecution failed: Host key verification failed.=0A=0ASo, on the remote host:= =0A=0A[boxlive@/usr/nagios/.ssh]# pwd=0A/usr/nagios/.ssh=0A[boxlive@/usr/na= gios/.ssh]# ls -la=0Atotal 10=0Adrwx------ 2 nagios other 512 Ma= y 28 11:21 .=0Adrwxr-xr-x 4 nagios other 512 May 28 13:30 ..=0A-= rw-r--r-- 1 nagios other 1194 Jul 11 09:35 authorized_keys=0A-rw-= ------ 1 nagios other 887 May 28 11:10 id_rsa=0A=0A=0AWhat am I = doing wrong ?=0A=0AHow do I get this to work correctly ?=0A=0ANagios was in= stalled from /usr/ports/net-mgmt/nagios-devel, which is nagios-3.0.3.=0A=0A= Thank you for your time,=0ALazar=0A=0A=0A ____________________________= ______________________________=0ANot happy with your email address?.=0AGet = the one you really want - millions of new email addresses available now at = Yahoo! http://uk.docs.yahoo.com/ymail/new.html
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?939463.15027.qm>