O'Reilly logo

Nagios, 2nd Edition by Wolfgang Barth

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required