Xymon Mailing List Archive search

Ignoring a Service

3 messages in this thread

list David Balderston · Thu, 12 Jul 2012 21:29:52 +0000 ·
Hey,

I need some help to ignore this service.  Have tried many different ways of putting this in the code, but nothing seems to work.  Trying to ignore smtp for one host because it alerts every time it turns on to send an email.  Here is what i have in the alerts.cfg:

HOST=%(server*|server2*)
        IGNORE HOST=server* SERVICE=smtp
        MAIL user-04ae7151bbbd@xymon.invalid REPEAT=999999 RECOVERED

So the way i understand this is that it should be ignoring smtp but still emailing about the other services.  If anyone has any ideas on what i may be doing wrong that would be great.  

Thanks,

David Balderston
Core Bio Services
user-63a5a9869cbc@xymon.invalid
list Larry Barber · Thu, 12 Jul 2012 16:37:39 -0500 ·
I do it like this:

HOST=%(server*|server2*)
        MAIL user-04ae7151bbbd@xymon.invalid EXSERVICE=smtp REPEAT=999999 RECOVERED

Thanks,
Larry Barber
quoted from David Balderston


On Thu, Jul 12, 2012 at 4:29 PM, Balderston, David <user-63a5a9869cbc@xymon.invalid>wrote:
Hey,

I need some help to ignore this service.  Have tried many different ways
of putting this in the code, but nothing seems to work.  Trying to ignore
smtp for one host because it alerts every time it turns on to send an
email.  Here is what i have in the alerts.cfg:

HOST=%(server*|server2*)
        IGNORE HOST=server* SERVICE=smtp
        MAIL user-04ae7151bbbd@xymon.invalid REPEAT=999999 RECOVERED

So the way i understand this is that it should be ignoring smtp but still
emailing about the other services.  If anyone has any ideas on what i may
be doing wrong that would be great.

Thanks,

David Balderston
Core Bio Services
user-63a5a9869cbc@xymon.invalid

list David Baldwin · Fri, 13 Jul 2012 09:31:25 +1000 ·
All,

It's not a problem preventing functionality in this case, but % patterns
match using regular expressions not wildcards.

The patterns aren't anchored by default (i.e. they match a substring),
so in fact the pattern %(server*|server2*) will match any name which
includes the string "serve" (optionally followed by 0 or more "r"
characters) or "server" (optionally followed by 0 or more "2"
characters) - which is already matched by the first pattern. So for
example "abcserve123" will match.

If you wanted to do anchored matching (i.e. not substrings) then the
following regular expression would be the equivalent for a wildcard pattern:
%(^server.*|^server2.*)
 or more compact:
%^server2?.*

http://www.regular-expressions.info/ is a useful resource

David.
I do it like this:

HOST=%(server*|server2*)
        MAIL user-04ae7151bbbd@xymon.invalid <mailto:user-04ae7151bbbd@xymon.invalid>
EXSERVICE=smtp REPEAT=999999 RECOVERED

Thanks,
Larry Barber


On Thu, Jul 12, 2012 at 4:29 PM, Balderston, David <user-63a5a9869cbc@xymon.invalid
quoted from Larry Barber
<mailto:user-63a5a9869cbc@xymon.invalid>> wrote:

    Hey,

    I need some help to ignore this service.  Have tried many
    different ways of putting this in the code, but nothing seems to
    work.  Trying to ignore smtp for one host because it alerts every
    time it turns on to send an email.  Here is what i have in the
    alerts.cfg:

    HOST=%(server*|server2*)
            IGNORE HOST=server* SERVICE=smtp

            MAIL user-04ae7151bbbd@xymon.invalid <mailto:user-04ae7151bbbd@xymon.invalid>
quoted from Larry Barber
    REPEAT=999999 RECOVERED

    So the way i understand this is that it should be ignoring smtp
    but still emailing about the other services.  If anyone has any
    ideas on what i may be doing wrong that would be great.

    Thanks,

    David Balderston
    Core Bio Services

    user-63a5a9869cbc@xymon.invalid <mailto:user-63a5a9869cbc@xymon.invalid>

-- 
David Baldwin - Senior Systems Administrator (Datacentres + Networks)
Information and Communication Technology Services
Australian Sports Commission          http://ausport.gov.au
Tel 02 62147830 Fax 02 62141830       PO Box 176 Belconnen ACT 2616
user-cbbf693f2c89@xymon.invalid          Leverrier Street Bruce ACT 2617


Keep up to date with what's happening in Australian sport visit http://www.ausport.gov.au

This message is intended for the addressee named and may contain confidential and privileged information. If you are not the intended recipient please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you receive this message in error, please delete it and notify the sender.