Book Image

Learning Nagios 3.0

Book Image

Learning Nagios 3.0

Overview of this book

Table of Contents (16 chapters)
Learning Nagios 3.0
Credits
About the Author
About the Reviewer
Preface

Using the check_by_ssh Plugin


As mentioned earlier, Nagios uses a separate check command that connects to a remote machine over SSH and runs the actual check command on it. The command has very powerful features and can be used to query a single service status by using active checks and can be used to perform and report multiple checks at once as passive checks.

The following is the syntax of the command:

check_by_ssh -H <host> -C <command> [-fqv] [-1|-2] [-4|-6]
[-S [lines]] [-E [lines]] [-t timeout] [-i identity]
[-l user] [-n name] [-s servicelist] [-O outputfile]
[-p port] [-o ssh-option]

The following table describes all options accepted by the plugin. Items required are marked in bold:

Option

Description

-H, --hostname

The host name or IP address of the machine to connect to; this option must be specified

-C, --command

The full path of the command to be executed on the remote host along with any additional arguments; this option must be specified

-l, --logname...