pkgsrc-wip/nrpe/files/nrpe.sh
URA Hiroshi 89df30e3e2 nrpe is used to execute Nagios plugins on remote hosts and report the results
to the main Nagios server. From the Nagios homepage:

Allows you to execute "local" plugins (like check_disk, check_procs, etc.) on
remote hosts. The check_nrpe plugin is called from Nagios and actually makes
the plugin requests to the remote host. Requires that nrpe be running on the
remote host (either as a standalone daemon or as a service under inetd).

nrpe2 is incompatible with nrpe version 1, if you are running this version
see net-mgmt/nrpe. Both ports can be installed in parallel but share the same
configuration file by default. This is easily changed in the nrpe startup
file.

WWW: http://www.nagios.org/
2005-06-15 06:23:26 +00:00

25 lines
501 B
Bash

#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: nrpe.sh,v 1.1.1.1 2005/06/15 06:23:26 ura Exp $
#
# PROVIDE: nrpe
# REQUIRE: DAEMON
# KEYWORD: shutdown
# To start nrpe at startup, copy this script to /etc/rc.d and set
# nrpe="YES" in /etc/rc.conf.
if [ -f /etc/rc.subr ]
then
. /etc/rc.subr
fi
name=nrpe
rcvar=$name
command="@PREFIX@/sbin/nrpe"
required_files="@PREFIX@/etc/nagios/nrpe.cfg"
command_args="-c ${required_files} -d"
pidfile="@VARBASE@/run/${name}.pid"
load_rc_config ${name}
run_rc_command "$1"