I don't understand the check_by_ssh plugin

David Dyer-Bennet dd-b at dd-b.net
Fri Dec 5 21:32:56 CET 2008


On Fri, December 5, 2008 14:08, Marc Powell wrote:
>
> 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%'.

Okay, I can work with that.

The --help output from the plugin, and I believe the website (but it's
timing out right now for me), gave an example using the ordinary "uptime"
service, and not a nagios plugin; and the text made no mention of the
thing run needing to be a nagios plugin. If it needs to be a plugin (or if
the vast majority of effective uses use a plugin) those docs should
probably be updated to reflect that!

> 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.

Sure, I'm familiar with that.  For command-line testing I'm relying on my
normal key and ssh-agent authentication, but I am planning to set up a
special nagios key that I can install, with limited command access, on
systems I need to monitor this way.

-- 
David Dyer-Bennet, dd-b at dd-b.net; http://dd-b.net/
Snapshots: http://dd-b.net/dd-b/SnapshotAlbum/data/
Photos: http://dd-b.net/photography/gallery/
Dragaera: http://dragaera.info


------------------------------------------------------------------------------
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