<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Thanks!!!   john.thurston<br><br>what I really really wanted t=test d=dev p=prod etc<br><br> *** Match with 'HOST=%^usphl0(p|d|t)sas\w+ SERVICE=disk_app' ***<br><br><br><br><div>> To: xymon@xymon.com<br>> From: john.thurston@alaska.gov<br>> Date: Wed, 27 Jul 2016 09:00:47 -0800<br>> Subject: Re: [Xymon] alert configuration wildcard HOST<br>> <br>> On 7/27/2016 8:38 AM, Bakkies Gatvol wrote:<br>> > This works<br>> ><br>> ><br>> > HOST=%_ip_printer SERVICE=conn<br>> ><br>> > matches any host ending in %_ip_printer<br>> <br>> No, the percent character is not a wildcard. It indicates that what <br>> follows is a regular expression. Yours matches any host _containing_ <br>> "_ip_printer"<br>> <br>> http://perldoc.perl.org/5.8.8/perlre.html<br>> <br>> > what I want to match now<br>> ><br>> > usphl0tsasdbv0<br>> > usphl0tsasvav1<br>> <br>> HOST=%foo.<br>> <br>> Would match any host containing "foo" followed by any other character. <br>> That gets close to what you want in the fewest characters. But it will <br>> match "food" just as well as "shesafool" or "ofoo8".<br>> <br>> HOST=%^foo.<br>> <br>> requires that the host name begin with "foo" and is followed by any <br>> character. This would match "food", and "foo8".<br>> <br>> host=%^foo\d<br>> <br>> requires the hostname begins with "foo" and is followed by a digit.<br>> <br>> <br>> -- <br>>     Do things because you should, not just because you can.<br>> <br>> John Thurston    907-465-8591<br>> John.Thurston@alaska.gov<br>> Enterprise Technology Services<br>> Department of Administration<br>> State of Alaska<br>> _______________________________________________<br>> Xymon mailing list<br>> Xymon@xymon.com<br>> http://lists.xymon.com/mailman/listinfo/xymon<br></div>                                     </div></body>
</html>