How to totally disable alerts for a particular host?
I'm not sure I understand the docs here... is something like this correct?
These rules eliminate printers from warnings/alerts
##HOST=%^pr*.hmgc.mcw.edu
IGNORE
HOST=lp4.phys.mcw.edu IGNORE ##HOST=%^hp*
IGNORE
Misc hosts we do not want alerts on
##HOST=mac1.hmgc.mcw.edu
IGNORE
##HOST=canadeo-disk.brc.mcw.edu
IGNORE
##HOST=sharpe.phys.mcw.edu
IGNORE
HOST=bc1s7.phys.mcw.edu IGNORE
Now on to our regular monitoring rules for things we DO want alerts on
HOST=uram.hmgc.mcw.edu MAIL brodie at phys.mcw.edu REPEAT=30 RECOVERED FORMAT=TEXT MAIL kent.brodie at pager.mcw.edu REPEAT=30 RECOVERED FORMAT=SMS
##SERVICE=disk
MAIL brodie at phys.mcw.edu REPEAT=30 RECOVERED FORMAT=TEXT
HOST=loki.phys.mcw.edu SERVICE=disk MAIL brodie at phys.mcw.edu REPEAT=60 RECOVERED FORMAT=TEXT
SERVICE=conn MAIL sysadmins REPEAT=30 RECOVERED FORMAT=TEXT MAIL pagers REPEAT=30 RECOVERED FORMAT=SMS
SERVICE=oracle MAIL szacher at hmgc.mcw.edu REPEAT=30 RECOVERED FORMAT=TEXT MAIL sysadmins REPEAT=30 RECOVERED FORMAT=TEXT MAIL kent.brodie at pager.mcw.edu REPEAT=30 RECOVERED FORMAT=SMS [hobbit at coffman etc]$
On Wed, Jul 12, 2006 at 10:19:35PM -0500, Brodie, Kent wrote:
I'm not sure I understand the docs here... is something like this correct?
[snip]
HOST=lp4.phys.mcw.edu IGNORE
Looks right, this will drop all alerts for this host.
##HOST=%^pr*.hmgc.mcw.edu
IGNORE
I know you commented this out, but I just want to say that you've probably hit one of the common "gotchas" in regular expressions: If you want to match "anything", you must use ".*" - not just "*". So to match any hostname beginning with "pr" and ending in ".hmgc.mcw.edu" you would use HOST=%^pr.*.hmgc.mcw.edu or if you want to be really picky (because the dots in ".hmgc.mcw.edu" will really match any character: HOST=%^pr.*\.hmgc\.mcw\.edu
The "*" in a reg. exp. means "zero or more occurrences of the previous". So "pr*" will match "p" (zero r's), as well as "pr", "prr", "prrr", "prrrrrrrr" etc.
Regards, Henrik
participants (2)
-
brodie@mcw.edu
-
henrik@hswn.dk