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,
Erik D. Schminke | Associate Systems Programmer Hormel Foods Corporation | One Hormel Place | Austin, MN 55912 Phone: (507) 434-6817 edschminke at hormel.com | www.hormelfoods.com
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
participants (2)
-
cleaver@terabithia.org
-
EDSchminke@Hormel.com