<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<div>Top post here :) <br>
<br>
Is it matching an 's', or is it just matching all tests defined in the config?<br>
<br>
>>>> 2012-11-16 10:25:34 xgetenv: Cannot find value for variable <<<<<br>
</div>
<div><br>
2012-11-16 10:25:34 Using default environment file /usr/lib/xymon/server/etc/xymonserver.cfg</div>
<div>trends</div>
<div>ntpsync</div>
<div>files</div>
<div>msgs</div>
<div>ports</div>
<div>procs</div>
<div>disk</div>
<div>ssh</div>
<div>dns</div>
<div>trends<br>
<br>
<br>
</div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF821092"><font color="#000000" face="Tahoma" size="2"><b>From:</b> xymon-bounces@xymon.com [xymon-bounces@xymon.com] on behalf of Jeremy Laidman [jlaidman@rebel-it.com.au]<br>
<b>Sent:</b> Thursday, November 15, 2012 4:29 PM<br>
<b>To:</b> Gore, David W (David)<br>
<b>Cc:</b> xymon@xymon.com<br>
<b>Subject:</b> Re: [Xymon] xymondboard - can I get an exact match? (and writing xymon ACK script and opening tickets)<br>
</font><br>
</div>
<div></div>
<div>On 16 November 2012 02:30, Gore, David W (David) <span dir="ltr"><<a href="mailto:david.gore@verizon.com" target="_blank">david.gore@verizon.com</a>></span> wrote:<br>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div lang="EN-US">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1f497d">Sorry for the top posting, that is dictated by the company.</span></p>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>and now seems to be the default on the interwebs. :-(</div>
<div><br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div lang="EN-US">
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:rgb(31,73,125); font-family:Calibri,sans-serif; font-size:11pt">Here is a sample that works:</span></p>
</div>
</blockquote>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div lang="EN-US">
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1f497d">~/server/bin/xymon localhost 'xymondboard test=s$ host=(abc|xyz)myhost01'</span></p>
</div>
</blockquote>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>Here's an example, matching tests that ends with 's', much like yours:</div>
<div><br>
</div>
<div>
<div>~$ xymoncmd xymon localhost 'xymondboard test=s$ fields=testname'|head</div>
<div>2012-11-16 10:25:34 xgetenv: Cannot find value for variable</div>
<div>2012-11-16 10:25:34 Using default environment file /usr/lib/xymon/server/etc/xymonserver.cfg</div>
<div>trends</div>
<div>ntpsync</div>
<div>files</div>
<div>msgs</div>
<div>ports</div>
<div>procs</div>
<div>disk</div>
<div>ssh</div>
<div>dns</div>
<div>trends</div>
</div>
<div><br>
</div>
<div>This is obviously broken: it is matching an "s" anywhere, as if the "$" is missing.  Yet pcregrep works with the same search string:</div>
<div><br>
</div>
<div>
<div>$ printf "trends\nntpsync\nfiles\ncpu\n" | pcregrep 's$'</div>
<div>trends</div>
<div>files</div>
</div>
<div><br>
</div>
<div>Using "\z" instead of "$" works.</div>
<div><br>
</div>
<div>Matching start of test/host with "^" works correctly.</div>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>Regardless of my difficulties, Betsy, I'm hoping you managed to get the output you were looking for?</div>
<div><br>
</div>
<div>J</div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</body>
</html>