<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Has anyone been able to confirm or reproduce this?<br>
<br>
-Charles<br>
<br>
Charles Jones wrote:
<blockquote cite="mid458AC832.8010100@cisco.com" type="cite">
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
I am again being bitten by regex problems.  I am able to reproduce it
with the following entries in hobbit-alerts.cfg:<br>
  <br>
  <tt>$IGNORE_HOSTS=%prod-web-(1|2|3|4|9|10|11)$<br>
HOST=$IGNORE_HOSTS service=*<br>
IGNORE</tt><br>
  <br>
If I then check the "info" column of a host that is <b>not</b>
supposed to be ignored, such as prod-web-12. It shows that it is indeed
ignored. This is a serious problem as I have already missed alerts for
some production hosts because of this problem.<br>
  <br>
According to pcretest (Henriks recommended method of testing a Hobbit
regex), there is nothing wrong with the regular expression that I am
using:<br>
  <tt>$ pcretest <br>
PCRE version 6.6 06-Feb-2006<br>
re> /prod-web-(1|2|3|4|9|10|11)$/<br>
data> prod-web-12    (<b>correctly not matching</b>)<br>
No match<br>
data> prod-web-19  (<b>correctly not matching</b>)<br>
No match<br>
data> prod-web-10 (<b>correctly matching</b>)<br>
 0: prod-web-10<br>
 1: 10</tt><br>
  <br>
>From the above tests you can see that prod-web-12 does not match the
regex when using pcretest, yet Hobbit is matching it for some reason. A
possible work-around could be to not use a regex at all, such as
$IGNORE_HOSTS=prod-web-1,prod-web-2,prod-web-3... but that is not
really a solution if you have hundreds of hosts, and my main point is
that regular expressions are not working as they are documented.<br>
  <br>
I've also tried other undocumented ways of using the regex, including:<br>
  <br>
  <tt>No hosts matched at all<br>
$IGNORE_HOSTS=%</tt><tt>prod-web-(1|2|3|4|9|10|11)$<br>
HOST="IGNORE_HOSTS"<br>
  <br>
No hosts matched at all<br>
$IGNORE_HOSTS="%</tt><tt>prod-web-(1|2|3|4|9|10|11)$"<br>
HOST=$IGNORE_HOSTS<br>
  <br>
All hosts match (both web-12 and web-11)<br>
$IGNORE_HOSTS=</tt><tt>prod-web-(1|2|3|4|9|10|11)$<br>
HOST=%$IGNORE_HOSTS<br>
  </tt><tt><br>
  </tt>If anyone else can verify or reproduce this, it would be helpful
in at least convincing Henrik to add it to the list of things to fix in
the next version. I honestly hope that it's not a problem with Hobbit
and instead something I am doing wrong - if so please enlighten me.<br>
  <br>
-Charles<tt><br>
  </tt>
</blockquote>
<br>
</body>
</html>