Re: [Mon-devel] Mon's Acknowledge system flawed?
Brought to you by:
trockij
From: Augie S. <aug...@gm...> - 2007-03-22 16:43:17
|
On 3/7/07, David Nolan <vit...@cm...> wrote: > You are correct that the old mon 0.99.2 code exhibits this behavior. > The more recent code in CVS has a configurable feature that causes mon > to remove the ack state from a service if the summary component of the > failure message changes. In most common usage the summary is the list > of hosts that are failing, so additional hosts failing would remove an > ack. After poking around in the latest HEAD release I found the unack_summary configuration option, and it works great after patching to fix a few bugs: --- mon 2007-03-20 15:33:26.000000000 -0700 +++ mon 2007-03-21 14:15:22.000000000 -0700 @@ -1132,11 +1132,11 @@ } elsif ($1 eq "unack_summary") { if (defined $2) { if ($2 =~ /y(es)?/i) { - $2 = 1; + $UNACK_SUMMARY= 1; } elsif ($2 =~ /n(o)?/i) { - $2 = 0; + $UNACK_SUMMARY= 0; } - if ($2 eq "0" || $2 eq "1") { + elsif ($2 eq "0" || $2 eq "1") { $UNACK_SUMMARY = $2; } else { return "cf error: invalid unack_summary value '$2' (syntax: unack_summary [0|1|y|yes|n|no])"; $2 is a read-only variable and trying to assign to it throws errors on my system, the above patch addresses that. -- Augie Schwer - Augie@Schwer.us - http://schwer.us Key fingerprint = 9815 AE19 AFD1 1FE7 5DEE 2AC3 CB99 2784 27B0 C072 |