Running Checks To Remote Hosts Over SSH

Marc Powell mpowell at ena.com
Fri Mar 7 22:31:23 CET 2003


check_by_ssh plugin.

[mpowell at oscar mpowell]$ ~nagios/libexec/check_by_ssh  --help
check_by_ssh (nagios-plugins 1.3.0-alpha1) 1.1.1.1
The nagios plugins come with ABSOLUTELY NO WARRANTY. You may
redistribute
copies of the plugins under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
Copyright (c) 1999      Karl DeBisschop (kdebisschop at alum.mit.edu)

This plugin will execute a command on a remote host using SSH

Usage:
check_by_ssh [-f] [-t timeout] [-i identity] [-l user] -H <host>
<command>
             [-n name] [-s servicelist] [-O outputfile] [-P port]
check_by_ssh  -V prints version info
check_by_ssh  -h prints more detailed help

Options:
-H, --hostname=HOST
   name or IP address of remote host
-C, --command='COMMAND STRING'
   command to execute on the remote machine
-f tells ssh to fork rather than create a tty
-t, --timeout=INTEGER
   specify timeout (default: 10 seconds) [optional]
-l, --logname=USERNAME
   SSH user name on remote host [optional]
-i, --identity=KEYFILE
   identity of an authorized key [optional]
-O, --output=FILE
   external command file for nagios [optional]
-s, --services=LIST
   list of nagios service names, separated by ':' [optional]
-n, --name=NAME
   short name of host in nagios configuration [optional]

The most common mode of use is to refer to a local identity file with
the '-i' option. In this mode, the identity pair should have a null
passphrase and the public key should be listed in the authorized_keys
file of the remote host. Usually the key will be restricted to running
only one command on the remote server. If the remote SSH server tracks
invocation agruments, the one remote program may be an agent that can
execute additional commands as proxy

To use passive mode, provide multiple '-C' options, and provide
all of -O, -s, and -n options (servicelist order must match '-C'
options)

--
Marc


> -----Original Message-----
> From: Kaplan, Andrew H. [mailto:AHKAPLAN at PARTNERS.ORG]
> Sent: Friday, March 07, 2003 3:24 PM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] Running Checks To Remote Hosts Over SSH
> 
> Hi there,
> 
> We have a server which has only port 22 (ssh) open for remote
connection.
> Isn't
> there a way to
> run checks to the nrpe client on the remote server over ssh?
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Etnus, makers of TotalView, The
> debugger
> for complex code. Debugging C/C++ programs can leave you feeling lost
and
> disoriented. TotalView can help you find your way. Available on major
UNIX
> and Linux platforms. Try it free. www.etnus.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


-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.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