9.3 Nagios Configuration

The matching command object is again defined in the file checkcommands.cfg; similar to check_local_disk, it should be named check_ssh_disk:

# check_ssh_disk command definition
define command{
    command_name  check_ssh_disk
    command_line     $USER1$/check_by_ssh -H $HOSTADDRESS$ \
                     -i /etc/nagios/.ssh/id_dsa \
                     -C "$USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$"
}

The command line stored in command_line first runs check_by_ssh; $USER1$ contains the local plugin path on the Nagios server. Next come the arguments—the IP address of the target host (parameter -H), the private key file (parameter -i) and finally, with the -C parameter, the complete command that the target host should carry out. If the plugin path on the target host and ...

Get Nagios, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.