I don't understand the check_by_ssh plugin
Marc Powell
marc at ena.com
Fri Dec 5 21:08:05 CET 2008
On Dec 5, 2008, at 11:55 AM, David Dyer-Bennet wrote:
> When I run it from the command line simply, I just get the output of
> the
> remote command (as if the plugin was just passing it through). I
> see that
> I could cause it to produce errors based on how long it takes, but
> nothing
> about how to actually use the output.
This is what check_by_ssh does. It's simply a transport mechanism to
allow nagios to run a plugin on a remote host and receive that
plugin's output. It does not perform any testing, just transport. The
plugin that is being executed by check_by_ssh would be doing the
testing that you're looking for. For example --
define command {
command_name check_disk_remote
command_line $USER1$/check_by_ssh -t 120 -l
username -H $HOSTADDRESS$ -C "/home/monitor/libexec/check_disk -t 40 -
w 10% -c 5%"
}
When nagios executes the check_disk_remote command, it will tell
check_by_ssh to connect to $HOSTADDRESS$ as username and execute the
command '/home/monitor/libexec/check_disk -t 40 -w 10% -c 5%'.
check_disk is a nagios plugin that lives on the remote host. The
plugin will execute and check_by_ssh will capture it's output and exit
code and return those to nagios. Nagios will interpret those as if the
check_disk plugin were run directly. If the check_disk plugin returns
a non-OK state, nagios will see that as if it were run locally, the
check_by_ssh transport is transparent as far as nagios is concerned.
In order for the ssh connection to work, you do need to configure
SSH's authorized_keys functionality. You can limit the host allowed to
connect without password as well as the specific command that is run
based on the key.
--
Marc
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
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