[Pkg-nagios-devel] Bug#661660: contrib script handle-master-proc-event fails to run properly
Antoine Beaupré
anarcat at debian.org
Tue Feb 28 23:49:32 UTC 2012
Package: nagios3
Version: 3.2.1-2
Severity: normal
Tags: upstream, patch
Upstream documentation documents how to setup a redundant setup for
nagios here:
http://nagios.sourceforge.net/docs/3_0/redundancy.html
Some scripts described in the documentation are provided in
contrib/eventhandlers/redundancy-scenario1
In particular, this script (handle-master-proc-event) doesn't actually
run at all, due to a missing dollar sign in a variable usage. It
certainly looks like nobody ever bothered to even run this script at
all.
Furthermore, instead of disable/enabling notifications like the
documentation suggests (and also the host script does,
handle-master-host-event), it insteads turns on and off service
checks, which is a completely different story.
The following patch fixes both issues.
diff --git a/contrib/eventhandlers/redundancy-scenario1/handle-master-proc-event b/contrib/eventhandlers/redundancy-scenario1/handle-master-proc-event
index 50672b3..572a4fc 100755
--- a/contrib/eventhandlers/redundancy-scenario1/handle-master-proc-event
+++ b/contrib/eventhandlers/redundancy-scenario1/handle-master-proc-event
@@ -28,7 +28,7 @@ HARD)
# take over the responsibility of monitoring
# the network, so enable active checks...
- `$eventhandlerdir/enable_active_service_checks`
+ `$eventhandlerdir/enable_notifications`
;;
WARNING|UNKNOWN)
@@ -46,7 +46,7 @@ HARD)
# We should go back to being the slave host,
# so disable active checks
- `eventhandlerdir/disable_active_service_checks`
+ `$eventhandlerdir/disable_notifications`
;;
esac
-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_CA.UTF-8, LC_CTYPE=fr_CA.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to fr_CA.UTF-8)
Shell: /bin/sh linked to /bin/dash
More information about the Pkg-nagios-devel
mailing list