<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Logwatch: Count lines per minute & logrotate]]></title><description><![CDATA[<p dir="auto">I'd like to pull some statistics out of a logfile as it is being written to, for example "requests per minute". I know how to set up logwatch and create parsers to match error messages and get notifications for those, but this is a little different. What I want is the number of times a rule has matched and then set up a delta DCI so I can get requests per minute. Is this possible, and if so, how?</p>
<p dir="auto">In addition I've been wondering what happens to the logwatch subagent when logrotate moves the file away. Will it reopen the new logfile?</p>
]]></description><link>https://forum.netxms.org/topic/2653/logwatch-count-lines-per-minute-logrotate</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 09:47:21 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/2653.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 07 Oct 2013 16:18:11 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Logwatch: Count lines per minute & logrotate on Mon, 07 Oct 2013 21:15:08 GMT]]></title><description><![CDATA[<p dir="auto">Answering my own question: I found the <strong>LogWatch.Parser.MatchedRecords(*)</strong> DCI to get the number of matched records. Had to create a separate parser XML to get only the records that I want, as it's not possible to select by rule, only by file. Then I had to guess what the parameter for that DCI was - turns out it's the name of the first <strong>&lt;file&gt;</strong> tag in the parser definition. Then I just put a "Delta per Minute" transformation on the DCI and I get nice charts.</p>
<p dir="auto">Is this documented anywhere? Because I couldn't find anything about that DCI other than in the source, and neither could Google. I often find myself poking around in NetXMS source (which is pleasantly clean by the way) because the documentation seems incomplete or outdated.</p>
]]></description><link>https://forum.netxms.org/post/11475</link><guid isPermaLink="true">https://forum.netxms.org/post/11475</guid><dc:creator><![CDATA[Ingmar]]></dc:creator><pubDate>Mon, 07 Oct 2013 21:15:08 GMT</pubDate></item></channel></rss>