Xymon Mailing List Archive search

How to totally disable alerts for a particular host?

4 messages in this thread

list Kent Brodie · Wed, 12 Jul 2006 22:19:35 -0500 ·
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 user-da7f7d5174c0@xymon.invalid REPEAT=30 RECOVERED FORMAT=TEXT
        MAIL user-f41ee3b0dc7b@xymon.invalid REPEAT=30 RECOVERED FORMAT=SMS

##SERVICE=disk
##    MAIL user-da7f7d5174c0@xymon.invalid REPEAT=30 RECOVERED FORMAT=TEXT

HOST=loki.phys.mcw.edu SERVICE=disk
        MAIL user-da7f7d5174c0@xymon.invalid REPEAT=60 RECOVERED FORMAT=TEXT

SERVICE=conn
        MAIL sysadmins REPEAT=30 RECOVERED FORMAT=TEXT
        MAIL pagers REPEAT=30 RECOVERED FORMAT=SMS

SERVICE=oracle
        MAIL user-37274d69ae6a@xymon.invalid REPEAT=30 RECOVERED FORMAT=TEXT
        MAIL sysadmins REPEAT=30 RECOVERED FORMAT=TEXT
        MAIL user-f41ee3b0dc7b@xymon.invalid REPEAT=30 RECOVERED FORMAT=SMS
[hobbit at coffman etc]$
list Kent Brodie · Wed, 12 Jul 2006 22:26:56 -0500 ·
In truth, I think my issue is I'm not completely understanding the "perl
compatable" regular expressions.  Can someone perhaps include some
examples?

I am finding that some of my attempts below are actually causing ALL
alerts to simply cease--  with nothing in the log files to indicate I
have an issue!!!
quoted from Kent Brodie

-----Original Message-----
From: Brodie, Kent [mailto:user-8fbf1c81e97c@xymon.invalid] 
Sent: Wednesday, July 12, 2006 10:20 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] 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 user-da7f7d5174c0@xymon.invalid REPEAT=30 RECOVERED FORMAT=TEXT
        MAIL user-f41ee3b0dc7b@xymon.invalid REPEAT=30 RECOVERED FORMAT=SMS

##SERVICE=disk
##    MAIL user-da7f7d5174c0@xymon.invalid REPEAT=30 RECOVERED FORMAT=TEXT

HOST=loki.phys.mcw.edu SERVICE=disk
        MAIL user-da7f7d5174c0@xymon.invalid REPEAT=60 RECOVERED FORMAT=TEXT

SERVICE=conn
        MAIL sysadmins REPEAT=30 RECOVERED FORMAT=TEXT
        MAIL pagers REPEAT=30 RECOVERED FORMAT=SMS

SERVICE=oracle
        MAIL user-37274d69ae6a@xymon.invalid REPEAT=30 RECOVERED FORMAT=TEXT
        MAIL sysadmins REPEAT=30 RECOVERED FORMAT=TEXT
        MAIL user-f41ee3b0dc7b@xymon.invalid REPEAT=30 RECOVERED FORMAT=SMS
[hobbit at coffman etc]$
list Henrik Størner · Thu, 13 Jul 2006 07:40:42 +0200 ·
quoted from Kent Brodie
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
list Henrik Størner · Thu, 13 Jul 2006 07:42:14 +0200 ·
quoted from Kent Brodie
On Wed, Jul 12, 2006 at 10:26:56PM -0500, Brodie, Kent wrote:
I am finding that some of my attempts below are actually causing ALL
alerts to simply cease--  with nothing in the log files to indicate I
have an issue!!!
Try using the "hobbitd_alert --test HOSTNAME SERVICE" - it will show you
how your rules work.


Regards,
Henrik