<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 4 March 2014 00:17, Neil Simmonds <span dir="ltr"><<a href="mailto:neilsimmonds1808@gmail.com" target="_blank">neilsimmonds1808@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div lang="EN-GB" link="#0563C1" vlink="#954F72"><div><p class="MsoNormal">
<span style="font-family:Arial,sans-serif;font-size:10pt">As far as I can see there is no built in way in Xymon to monitor a log for the number of times a string has occurred in a specified time period.</span></p></div></div>
</blockquote><div><br></div><div>Sure there is. From the client-local.cfg file comments:</div><div><br></div><div><div># "linecount:FILENAME"</div><div># Monitor the text-based logfile FILENAME, but just</div>
<div># count the number of times certain expressions appear.</div><div># This processes the entire file every time. It must</div><div># be followed by one or more lines with</div><div># "KEYWORD PATTERN"</div>
<div># KEYWORD identifies this count. You can use any string</div><div># except whitespace. PATTERN is a regular expression</div><div># that you want to search for in the file.</div></div><div><br></div>
<div>I use this to monitor the count of "xfer-in" and "xfer-out" messages on my DNS servers. There's already a graphs.cfg definition called [lines] that presents them nicely in a graph.</div><div>
<br></div><div>J</div><div><br></div></div></div></div>