Xymon Mailing List Archive search

alert configuration wildcard HOST

list Bakkies Gatvol
Wed, 27 Jul 2016 13:14:40 -0400
Message-Id: <user-e321969d0fc6@xymon.invalid>

Thanks!!!   john.thurston

what I really really wanted t=test d=dev p=prod etc

 *** Match with 'HOST=%^usphl0(p|d|t)sas\w+ SERVICE=disk_app' ***

To: xymon at xymon.com
From: user-ce4d79d99bab@xymon.invalid
Date: Wed, 27 Jul 2016 09:00:47 -0800
Subject: Re: [Xymon] alert configuration wildcard HOST

On 7/27/2016 8:38 AM, Bakkies Gatvol wrote:
This works


HOST=%_ip_printer SERVICE=conn

matches any host ending in %_ip_printer
No, the percent character is not a wildcard. It indicates that what follows is a regular expression. Yours matches any host _containing_ "_ip_printer"

http://perldoc.perl.org/5.8.8/perlre.html
what I want to match now

usphl0tsasdbv0
usphl0tsasvav1
HOST=%foo.

Would match any host containing "foo" followed by any other character. That gets close to what you want in the fewest characters. But it will match "food" just as well as "shesafool" or "ofoo8".

HOST=%^foo.

requires that the host name begin with "foo" and is followed by any character. This would match "food", and "foo8".

host=%^foo\d

requires the hostname begins with "foo" and is followed by a digit.


-- 
    Do things because you should, not just because you can.

John Thurston    XXX-XXX-XXXX
user-ce4d79d99bab@xymon.invalid
Enterprise Technology Services
Department of Administration
State of Alaska