[Xymon] Ignoring a Service

David Baldwin david.baldwin at ausport.gov.au
Fri Jul 13 01:31:25 CEST 2012


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 coreitstaff at ucsd.edu <mailto:coreitstaff at ucsd.edu>
> EXSERVICE=smtp REPEAT=999999 RECOVERED
>
> Thanks,
> Larry Barber
>
>
> On Thu, Jul 12, 2012 at 4:29 PM, Balderston, David <dbalders at ucsd.edu
> <mailto:dbalders at ucsd.edu>> 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 coreitstaff at ucsd.edu <mailto:coreitstaff at ucsd.edu>
>     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
>     dbalders at ucsd.edu <mailto:dbalders at ucsd.edu>
>
>
>
>
>     _______________________________________________
>     Xymon mailing list
>     Xymon at xymon.com <mailto:Xymon at xymon.com>
>     http://lists.xymon.com/mailman/listinfo/xymon
>
>
>
>
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com
> http://lists.xymon.com/mailman/listinfo/xymon


-- 
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
david.baldwin at ausport.gov.au          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.
-------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20120713/2e5e43f0/attachment.html>


More information about the Xymon mailing list