[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] Is there any equivalent to BB's notifications exclusions?
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] Is there any equivalent to BB's notifications exclusions?
- From: Henrik "Størner" <henrik (at) hswn.dk>
- Date: Thu, 22 Jan 2009 21:52:10 +0000 (UTC)
- Newsgroups: lists.hobbit
- Organization: Linux Users Inc.
- References: <gla1ip$f4m$1 (at) voodoo.hswn.dk> <1232649955 (at) mknews.sslug.dk>
- User-agent: nn/6.7.3
In <1232649955 (at) mknews.sslug.dk> "SebA" <spa (at) syntec.co.uk> writes:
>>> # You can also write rules to exclude recipients based on the
>>> # previous syntax. Just prefix with ! and any recipient
>>> # specified in the rule line will be removed from the
>>> # list of recipients that matches the regular rules #
>>> # for all hosts don't send any notifications from=3D20 # 12AM to 6AM
>>> and 8PM to 12AM #
>>> # !*;;*;;*;0000-0600 2000-2359;*
>>=20
>> If you only want to send alerts between 6AM and 8PM, then =20
>> TIME=3D*:0600:2000 will do that. Alternatively, an =
>"EXTIME=3D*:2000:0600"
>> has the same effect (a more direct conversion of this rule).
>That's not quite the same thing (see below), but I think if I put EXTIME
>rules in with the e-mail addresses in macros (for convenience), I will
>be able to do what I need to.
>>> # !host*;;*;;0 6;*;robert (at) localhost
>>=20
>> HOST=3D* EXHOST=3D%^host
>> MAIL robert (at) localhost
>Not really: the BB rule says: for _all_ alerts that were due to be
>raised for host*, at the weekend, to robert (at) localhost (based on higher
>up rules with no ! prefix), don't send them out. In other words,
>cancel all previous _matching_ MAIL commands for this exclusion.
In that case I misunderstood the BB config semantics - which is not
surprising, since they never made much sense to me, and I haven't
used them for more than 5 years :-)
>I still think Xymon may benefit from a notifications exclusions system
>though. (Especially for easier migration for BB users! ;)) On the other
>hand, it does add complication that is perhaps unnecessary. I currently
>use these exclusions extensively. From when someone goes on holiday
>(turn off all their alerts no matter what service or host they refer to),
>or maybe your e-mail to SMS gateway or provider has a problem and you
>want to stop all those e-mails (but not all the internal e-mails) being
>generated, queueing up and then coming through in a rather unnecessarrily
>expensive flood when the SMS provider starts working again.
I realize that you have a working set of configuration rules, but I think
it would be a lot easier to work out a functionally identical set of
rules for Hobbit/Xymon if you could describe what it is you want to
achieve with the configuration, instead of focusing on how it was
done in BB.
The closest to what you want to do might be to use the "IGNORE" setting in
hobbit-alerts.cfg. E.g. your example:
!host*;;*;;0 6;*;robert (at) localhost
could be accomplished with something like
HOST=%^host TIME=06:0000:2359
IGNORE
although this would kill alerts for all recipients, not just those destined
for "robert (at) localhost". And note that this must go BEFORE any of the other
rules for this host.
I can see that the BB exclusion mechanism might be useful in some circumstances,
but it would (obviously) make the alerting mechanism more complicated.
And I'm not convinced that there's enough gained to warrant this.
Regards,
Henrik