0

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?

  • What to you mean by control? Do you want do perform checks or trigger an action depending on a check result? – Matteo Jun 01 '12 at 05:29
  • I mean that in the Nagios server monitoring remote host, instead of installing nrpe, achieve the purpose of monitoring – user1227775 Jun 01 '12 at 05:39

1 Answers1

0

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$"
}
Matteo
  • 14,696
  • 9
  • 68
  • 106