summaryrefslogtreecommitdiff
path: root/manifests/nrpe.pp
diff options
context:
space:
mode:
authorGabriel Filion <gabriel@koumbit.org>2011-11-07 12:07:28 -0500
committerGabriel Filion <lelutin@gmail.com>2012-04-10 00:09:15 -0400
commit8f24f259caa75f78ed501377c95c0a6fab0ebb11 (patch)
treefba508140fdb75b251f3da838646c997978adff9 /manifests/nrpe.pp
parentb956d666681ccf20f70be65c3b57aa77928a9be9 (diff)
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.
Diffstat (limited to 'manifests/nrpe.pp')
-rw-r--r--manifests/nrpe.pp5
1 files changed, 5 insertions, 0 deletions
diff --git a/manifests/nrpe.pp b/manifests/nrpe.pp
index c9ecf75..5c05ed4 100644
--- a/manifests/nrpe.pp
+++ b/manifests/nrpe.pp
@@ -3,10 +3,15 @@ class nagios::nrpe {
case $operatingsystem {
'FreeBSD': {
if $nagios_nrpe_cfgdir == '' { $nagios_nrpe_cfgdir = '/usr/local/etc' }
+ if $nagios_nrpe_pid_file == '' { $nagios_nrpe_pid_file = '/var/spool/nagios/nrpe2.pid' }
+ if $nagios_plugin_dir == '' { $nagios_plugin_dir = '/usr/local/libexec/nagios' }
include nagios::nrpe::freebsd
}
default: {
+ if $nagios_nrpe_pid_file == '' { $nagios_nrpe_pid_file = '/var/run/nrpe.pid' }
+ if $nagios_plugin_dir == '' { $nagios_plugin_dir = '/usr/lib/nagios/plugins' }
+
case $kernel {
linux: { include nagios::nrpe::linux }
default: { include nagios::nrpe::base }