Looking at your command from your terminal example and then looking at your
command_line from your Nagios definition and your check_command statement the
fields all seems to be backwards
The things that I can see are
- Your Nagios configuration is using the root account to connect to
the server and your command line definition is using Nagios
- Your command_line is being passwd 'ipxenserver' as the remote
command to execute
- You command_line is being passwd your remote command as the ssh key
to use.
- You have a trailing ! in your check_command definition which we
create a variable with no value
I think your command definition and need to be updated, something like this
define command{
command_name check_xen_cpu
command_line $USER1$/check_by_ssh -l $ARG1$ H $HOSTADDRESS$ -C
$ARG2$ -I $ARG3$
}
define service {
service_description XenServer CPU Load
host_name ORL-XEN-02
check_command check_by_ssh_xentop!nagios!
/usr/lib/nagios/plugins/check_Xencpu.sh! /root/.ssh/id_rsa
}
James
>From Nagios server
nagios@nagioserver:~$ /usr/lib/nagios/plugins/check_by_ssh -l nagios -H
172.16.31.2 -C "/usr/lib/nagios/plugins/check_Xencpu" -i
/var/lib/nagios/.ssh/id_rsa
"OK:CPU%= 3"
command_line /usr/lib/nagios/plugins/check_by_ssh (1)-l '$ARG1$' (2)-H
'$HOSTADDRESS$' (3)-C '$ARG2$' (4)-i '$ARG3$'
check_command
check_by_ssh_xentop!(1)root!(2)ipxenserver!(3)/usr/lib/nagios/plugins/check_Xencpu.sh!(4)/root/.ssh/id_rsa!
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
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