[Xymon] xymondboard - can I get an exact match? (and writing xymon ACK script and opening tickets)

Jeremy Laidman jlaidman at rebel-it.com.au
Fri Nov 16 01:29:57 CET 2012


On 16 November 2012 02:30, Gore, David W (David) <david.gore at verizon.com>wrote:

> Sorry for the top posting, that is dictated by the company.
>

and now seems to be the default on the interwebs. :-(

****
>
> Here is a sample that works:
>
** **
>
> ~/server/bin/xymon localhost 'xymondboard test=s$ host=(abc|xyz)myhost01'
>

Seems odd indeed!  I'm also running version 4.3.10.  Regular expressions
(PCRE) aren't generally broken for me, but seems to be just this one thing.
 I can tie to the start of a string with a caret (^) but not to the end of
a string with a dollar ($) - and this applies to both hostname and
testname.  I'm on SLESv10, 64 bit, using PCRE v6.4.  Oddly, pcregrep
doesn't have the same symptoms.

Here's an example, matching tests that ends with 's', much like yours:

~$ xymoncmd xymon localhost 'xymondboard test=s$ fields=testname'|head
2012-11-16 10:25:34 xgetenv: Cannot find value for variable
2012-11-16 10:25:34 Using default environment file
/usr/lib/xymon/server/etc/xymonserver.cfg
trends
ntpsync
files
msgs
ports
procs
disk
ssh
dns
trends

This is obviously broken: it is matching an "s" anywhere, as if the "$" is
missing.  Yet pcregrep works with the same search string:

$ printf "trends\nntpsync\nfiles\ncpu\n" | pcregrep 's$'
trends
files

Using "\z" instead of "$" works.

Matching start of test/host with "^" works correctly.

I'm willing to accept that my build is somehow broken, but have no idea
what to look for.  It's not actually affecting me, and if it did, using
"\z" is a perfectly acceptable work-around.

Regardless of my difficulties, Betsy, I'm hoping you managed to get the
output you were looking for?

J
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20121116/9903c81c/attachment.html>


More information about the Xymon mailing list