From dddff2316ee0ce0dab3540538de44a3829cc5c07 Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Tue, 15 Feb 2011 19:11:50 -0500 Subject: nrpe.cfg: enable setting server_address By default, nrpe listens on every interfaces on the server. This is undesirable on Linux VServer hosts, since it will conflict with vservers. With a new variable, $nagios_nrpe_server_address, it is now possible to set the ip address on which the nrpe server will listen. --- templates/nrpe/nrpe.cfg | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'templates/nrpe/nrpe.cfg') diff --git a/templates/nrpe/nrpe.cfg b/templates/nrpe/nrpe.cfg index b31e5f9..b666e42 100644 --- a/templates/nrpe/nrpe.cfg +++ b/templates/nrpe/nrpe.cfg @@ -34,8 +34,11 @@ server_port=5666 # and you do not want nrpe to bind on all interfaces. # NOTE: This option is ignored if NRPE is running under either inetd or xinetd -#server_address=192.168.1.1 - +<%- if has_variable?("nagios_nrpe_server_address") then %> +<%- if not nagios_nrpe_server_address.to_s.empty? then %> +server_address=<%= nagios_nrpe_server_address %> +<%- end %> +<%- end %> # NRPE USER -- cgit v1.2.3 From 8f24f259caa75f78ed501377c95c0a6fab0ebb11 Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Mon, 7 Nov 2011 12:07:28 -0500 Subject: Fix NRPE for FreeBSD Plugins are found under another directory. The pid file must be changed to /var/spool/nagios/nrpe2.pid, since this place is writable by the daemon, and the rc script expects the pid file to be found there. Use a pattern instead of the rc script status command. --- templates/nrpe/nrpe.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'templates/nrpe/nrpe.cfg') diff --git a/templates/nrpe/nrpe.cfg b/templates/nrpe/nrpe.cfg index b666e42..5368bc8 100644 --- a/templates/nrpe/nrpe.cfg +++ b/templates/nrpe/nrpe.cfg @@ -16,7 +16,7 @@ # number. The file is only written if the NRPE daemon is started by the root # user and is running in standalone mode. -pid_file=/var/run/nrpe.pid +pid_file=<%= nagios_nrpe_pid_file %> -- cgit v1.2.3