[hobbit] hobbit-alerts.cfg -- Perl regex
Moving the % fixed the problem. Thanks for the help and tip.
On 11 Aug 2005 20:45:26 -0000, henrik at hswn.dk (Henrik Stoerner) wrote:
On Thu, Aug 11, 2005 at 03:07:47PM -0300, Werner Michels (Ext Lists) wrote:
Robert,
Please try change the HG definition as:$HG-WinSvrsCrit=%nyc(app1|dc1|dc2|ex1|ex03|fs1|fs2|time).domain.com
Observe that the "%" is the first char and this indicates that your using perl regex. With this change your host group should work fine.Werner is right here - the "%" must be first, it's only mission is to tell Hobbit to treat this as a regular expression instead of a simple text string.
For debugging regular expressions, I routinely use the info-page display (which shows clearly whether a host/test is matched or not), but also the "pcretest" tool that comes with the pcre library. Like this:
$ pcretest PCRE version 4.5 01-December-2003
re> /nyc(app1|dc1|dc2|ex1|ex03|fs1|fs2|time).domain.com/ data> nycdc2.domain.com 0: nycdc2.domain.com 1: dc2 data> nycdc4.domain.com No match
Regards, Henrik
--
Robert Herron robert.herron at gmail.com
participants (1)
-
robert.herron@gmail.com