[Xymon] client-local.cfg pattern matching

Japheth Cleaver cleaver at terabithia.org
Wed Nov 30 21:36:42 CET 2016


On 11/30/2016 10:41 AM, EDSchminke at Hormel.com wrote:
> I think there is a problem with how xymon processes the client-local.cfg
> file when it comes to pattern matching.
>
> I have the following in my client-local.cfg:
> [host=%(elm|oak|oracle[0-9][dp])]
>
> Next time this file is checked, this shows up in the xymond.log:
> 2016-11-30 11:06:50.100740 pcre compile '(elm|oak|oracle[0-9' failed
> (offset 19): missing terminating ] for character class
> 2016-11-30 11:06:50.100829 Invalid host pattern in client-local.cfg: (elm|
> oak|oracle[0-9
>
> It seems like whatever engine processes the client-local.cfg is doing a
> lazy pattern matching.  Rather than taking everything up to the LAST
> closing bracket, it grabs up to the FIRST closing bracket.
>
> However this is designed to work, grabbing up to the first closing bracket
> seriously breaks PCRE matching.  I think a change to this process is in
> order so that it grabs the LAST closing bracket.  Especially, if a % is
> present, indicating the following is PCRE pattern.
>

Thanks, I can confirm this is a bug.

The attached patch I believe should resolve it for you.
It's applied in 4.3.28 at https://sourceforge.net/p/xymon/code/7985/ and 
will be in the next release.

Regards,
-jc


-------------- next part --------------
A non-text attachment was scrubbed...
Name: clientpcre.patch
Type: text/x-patch
Size: 727 bytes
Desc: not available
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20161130/5d759f6a/attachment.bin>


More information about the Xymon mailing list