Xymon Mailing List Archive search

hobbit-alerts with RegEx

2 messages in this thread

list Thomas Ruecker · Wed, 04 May 2005 09:55:15 +0200 ·
Hi,
I build following var in the alerts config:
$HOST_SERVERS=%(server1.*).domain.com,%(server2.*).domain.com

Hobbit only see the first RegEx, the second will not been recordnize. If 
   I splitt it into to vars like:
$HOST_SERVERS1=%(server1.*).domain.com
$HOST_SERVERS2=%(server2.*).domain.com
Hobbit will recordnize both, but the other way is much shorter for me.

Is this a bug or a feature?

Regards,
Thomas
list Henrik Størner · Wed, 4 May 2005 10:27:46 +0200 ·
On Wed, May 04, 2005 at 09:55:15AM +0200, Thomas Ruecker wrote:
Hi,
I build following var in the alerts config:
$HOST_SERVERS=%(server1.*).domain.com,%(server2.*).domain.com
Hobbit doesn't recognize multiple regex'es on one line, since that is
better handled by just or'ing all of the patterns together. So this
line really should be
  $HOST_SERVERS=%(server1.*).domain.com|(server2.*).domain.com

or perhaps a simpler way

  $HOST_SERVERS=%(server1|server2).*.domain.com


Henrik