check_by_ssh error - Remote command execution failed
Juki
juki.emma at gmail.com
Wed Sep 2 11:26:08 CEST 2009
Hello people,
I'm trying to implement check_by_ssh to monitor local resource usage on a
remote host running Solaris 10. I'm following instructions as described in
the attachment.
Following the instructions, I have managed to ensure that the central Nagios
server (running Nagios v3.0rc2 on SuSE Linux 10.0) is able to connect to the
remote host via SSH in a manner that does not require a password. Below are
my command and service definitions, as defined on the central Nagios server,
for one of the resources (root partition disk usage) I intend to monitor;
+++++ Service Definition +++++
define service{
use generic-service ; Name
of service template to use
host_name sauga02
service_description Root Partition
check_command check_ssh_disk!25%!20%!
notifications_enabled 0
}
+++++ Command Definition +++++
# 'check_ssh_disk' command definition
define command {
command_name check_ssh_disk
command_line $USER1$/check_by_ssh -i /home/nagios/.ssh/id_dsa
-l nagios -H 10.151.28.22 -C /export/home/nagios/plugins/check_disk -w
$ARG1$ -c $ARG2$ -p $ARG3$
}
I created a password-less public/private keypair as the user running the
Nagios service (typically "nagios"), sending the public key to the remote
server, and then (as user "nagios") logging into the remote system.
After completing the setup, I run the following command from the central
Nagios server as a test and encountered the error as shown below;
nagios at central-host:~> /usr/local/nagios/libexec/check_by_ssh -H x.x.x.x -C
"/export/home/nagios/plugins/check_swap -w 50% -c 10%"
Remote command execution failed: ###################### !!! WARNING !!!
#############################
where;
- x.x.x.x - the IP of the remote host.
- /export/home/nagios/plugins - the location on the remote host where the
plugins are run from
I also run the same command using the host name of the remote host but that
gave me the same error. The web GUI also shows the same error.
Can someone please point me in the right direction towards solving this
issue?
Thanks,
Juki
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20090902/2d0e3426/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Linux012009.pdf
Type: application/pdf
Size: 41456 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/users/attachments/20090902/2d0e3426/attachment.pdf>
-------------- next part --------------
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
-------------- next part --------------
_______________________________________________
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