nagios how to monitor remote host by shell scripts?

1.5k Views Asked by At

Do not install nrpe, but want in the Nagios control server writing shell scripts to control the remote host,like a process, the database state. can achieve? How to write the script?

1

There are 1 best solutions below

0
On

An alternative to nrpe is to use the [check_by_ssh][1] plugin. It will connect via SSH and execute the specified plugin (or script).

Example for the check_free_mem plugin

define command{
    command_name    check_ssh_mem
    command_line    $USER1$/check_by_ssh -H $HOSTADDRESS$ -C "$USER1$/check_free_mem -w $ARG1$ -c $ARG2$"
}