<div dir="ltr">Christian<br><br><div class="gmail_quote"><div dir="ltr">On Tue, Aug 9, 2016 at 5:53 PM Becker Christian <<a href="mailto:christian.becker@rhein-zeitung.net">christian.becker@rhein-zeitung.net</a>> wrote:</div><div dir="ltr"><span style="line-height:1.5"><snip>       </span></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="DE" link="#0563C1" vlink="#954F72"><div>
<p class="MsoNormal"><span style="line-height:1.5">I was thinking, that this directive</span><br></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New";color:#2e75b6"><span>       
</span>LOG<span>     </span>%/<span>var</span>/(<span>adm|log</span>)/messages ERROR IGNORE=%(fd0|smbd|read_fd_with_timeout|Connection.reset.by.peer|error\.txt|gdm-simple-greeter|GdmDisplay|GdmSession|GDM|packagekitd|parport)
 COLOR=red<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">should <span>
msgs</span> let go to red, since the message of the affected server contains the keyword “error”, even in lowercase. But the history of the
<span>msgs</span> test for the affected server doesn’t show any red status.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">I do not have the statement (?-<span>i</span>) in the
<span>analysis.cfg</span> as documented in the <span>
Xymon</span> man-pages:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><i><span lang="EN-US" style="color:#2e75b6">Note that
<span>Xymon</span> defaults to case-insensitive pattern matching; if that is not what you want, put "(?-<span>i</span>)" between the "%" and the regular expression to turn this off. E.g. "%(?-<span>i</span>)WARNING"
 will match the word WARNING only when it is upper-case.<u></u><u></u></span></i></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span lang="EN-US">Is my thinking wrong?</span></b></p></div></div></blockquote><div>A little.</div><div><br></div><div>The man page mentions using "%(?-i)" in the context of matching regular expressions.  For non-regular-expressions, this doesn't apply.  The code that performs a non-RE match is:</div><div><br></div><div><div>        return (strstr(datatosearch, pattern) != NULL);</div></div><div><br></div><div>"strstr()" is a case-sensitive string match, so "ERROR" will not match "error".</div><div><br></div><div>You can either have a second line with the lower-case string, or convert to regular expression, and take advantage of the case-insensitive match:</div><div><br></div><div><p class="inbox-inbox-MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:"courier new";color:rgb(46,117,182)">       <span class="inbox-inbox-Apple-converted-space"> </span>LOG    <span class="inbox-inbox-Apple-converted-space"> </span>%/var/(adm|log)/messages %ERROR IGNORE=%(fd0|smbd|read_fd_with_timeout|Connection.reset.by.peer|error\.txt|gdm-simple-greeter|GdmDisplay|GdmSession|GDM|packagekitd|parport) COLOR=red<u></u><u></u></span></p><div><br></div>Cheers</div><div>Jeremy</div><div><br></div></div></div>