<?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[Log parsing]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I wanted to do a simple log parsing. Set simple match regexp - (error.*) and event with param on netxms log file. When I enabled the parser file on agent config, it started to spam a lot of events (~10 each sec), although there were no matching lines.</p>
<p dir="auto">Then i tried on a blank file, same thing, just spaming alot of events.<br />
Tried matching just a letter, the same.<br />
Anything i did, resulted in event spam.</p>
<p dir="auto">Parser:<br />
&lt;parser&gt;<br />
    &lt;file&gt;C:\NetXMS\log&lt;/file&gt;<br />
    &lt;rules&gt;<br />
        &lt;rule&gt;<br />
            &lt;match&gt;(error.*)&lt;/match&gt;<br />
            &lt;event params="1"&gt;100049&lt;/event&gt;<br />
        &lt;/rule&gt;<br />
    &lt;/rules&gt;<br />
&lt;/parser&gt;</p>
<p dir="auto">SubAgent = logwatch.nsm<br />
*LOGWATCH<br />
Parser = C:\NetXMS\logwatch\Test.xml</p>
<p dir="auto">Subagent is loaded successfully.<br />
Log:</p>
<blockquote>
<p dir="auto">[22-Apr-2014 14:18:56.050] [DEBUG] EVENT 100049 (ID:42456 F:0x0001 S:4 TAG:"") FROM Node:<br />
[22-Apr-2014 14:18:56.050] [DEBUG] [CLSN-0] Sending message CMD_EVENTLOG_RECORDS<br />
[22-Apr-2014 14:18:56.050] [DEBUG] Event 42456 match EPP rule 67<br />
[22-Apr-2014 14:18:56.050] [DEBUG] CorrelateEvent: event BACKUP_CRIT id 42457 source Node [100]<br />
[22-Apr-2014 14:18:56.050] [DEBUG] CorrelateEvent: finished, rootId=0<br />
[22-Apr-2014 14:18:56.050] [DEBUG] [CLSN-0] Sending message CMD_ALARM_UPDATE<br />
[22-Apr-2014 14:18:56.050] [DEBUG] EVENT 100049 (ID:42457 F:0x0001 S:4 TAG:"") FROM Node:<br />
[22-Apr-2014 14:18:56.050] [DEBUG] [CLSN-0] Sending message CMD_EVENTLOG_RECORDS<br />
[22-Apr-2014 14:18:56.050] [DEBUG] Event 42457 match EPP rule 67<br />
[22-Apr-2014 14:18:56.050] [DEBUG] CorrelateEvent: event BACKUP_CRIT id 42458 source Node [100]<br />
[22-Apr-2014 14:18:56.050] [DEBUG] [CLSN-0] Sending message CMD_ALARM_UPDATE<br />
[22-Apr-2014 14:18:56.050] [DEBUG] CorrelateEvent: finished, rootId=0<br />
[22-Apr-2014 14:18:56.050] [DEBUG] EVENT 100049 (ID:42458 F:0x0001 S:4 TAG:"") FROM Node:<br />
[22-Apr-2014 14:18:56.050] [DEBUG] [CLSN-0] Sending message CMD_EVENTLOG_RECORDS<br />
[22-Apr-2014 14:18:56.050] [DEBUG] Event 42458 match EPP rule 67<br />
[22-Apr-2014 14:18:56.050] [DEBUG] CorrelateEvent: event BACKUP_CRIT id 42459 source Node [100]<br />
[22-Apr-2014 14:18:56.050] [DEBUG] [CLSN-0] Sending message CMD_ALARM_UPDATE<br />
[22-Apr-2014 14:18:56.050] [DEBUG] CorrelateEvent: finished, rootId=0</p>
</blockquote>
<p dir="auto"> etc.</p>
<p dir="auto">Is this bug or I miss something?</p>
<p dir="auto">Regards,<br />
Nikk</p>
]]></description><link>https://forum.netxms.org/topic/3108/log-parsing</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 14:10:23 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/3108.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 22 Apr 2014 12:16:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Log parsing on Mon, 19 May 2014 11:48:06 GMT]]></title><description><![CDATA[<p dir="auto">Yes, first problem was obvious negligence mistake.</p>
<p dir="auto">And with upgrade to 1.2.14 everything works fine, thank you <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
<p dir="auto">Regards,<br />
Nikk</p>
]]></description><link>https://forum.netxms.org/post/13916</link><guid isPermaLink="true">https://forum.netxms.org/post/13916</guid><dc:creator><![CDATA[Nikk]]></dc:creator><pubDate>Mon, 19 May 2014 11:48:06 GMT</pubDate></item><item><title><![CDATA[Reply to Log parsing on Wed, 14 May 2014 14:56:19 GMT]]></title><description><![CDATA[<p dir="auto">First problem is that message is empty - this is because of wrong parameter count in event tag - it should be &lt;event params="1"&gt;100049&lt;/event&gt;. But spam problem most likely caused by this:</p>
<p dir="auto">[14-May-2014 10:15:41.670] [DEBUG] LogParser: file size differs for stat(4) and fstat(C:\NetXMS\var\log), assume file rename<br />
[14-May-2014 10:15:41.670] [DEBUG] LogParser: file "C:\NetXMS\var\log" (pattern "C:\NetXMS\var\log") successfully opened<br />
[14-May-2014 10:15:41.670] [DEBUG] LogParser: parsing existing records in file "C:\NetXMS\var\log"</p>
<p dir="auto">we recently encounter this bug on another installation - agent erroneously assume that file was renamed, and start reading file from the beginning. It is already fixed in current development version.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/13892</link><guid isPermaLink="true">https://forum.netxms.org/post/13892</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Wed, 14 May 2014 14:56:19 GMT</pubDate></item><item><title><![CDATA[Reply to Log parsing on Wed, 14 May 2014 07:39:50 GMT]]></title><description><![CDATA[<p dir="auto">Yes, i have changed the parser a little bit, but it doesn't change the problem. (see 1st screen) <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f615.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--confused" style="height:1.4em;width:auto;vertical-align:middle" title=":/" alt="😕" /></p>
<p dir="auto">So the parser is:</p>
<blockquote>
<p dir="auto">&lt;parser trace="9"&gt;<br />
    &lt;file&gt;C:\NetXMS\var\log&lt;/file&gt;<br />
   <br />
    &lt;rules&gt;<br />
        &lt;rule&gt;<br />
            &lt;match&gt;(StatusPoll.*)&lt;/match&gt;<br />
            &lt;event&gt;100049&lt;/event&gt;<br />
        &lt;/rule&gt;<br />
    &lt;/rules&gt;<br />
&lt;/parser&gt;</p>
</blockquote>
<p dir="auto">And attached is both agent and server logs.</p>
<hr />
<p dir="auto"><img src="/assets/uploads/files/smf/0000000001737-event.png" alt="event.png" class="img-markdown  img-fluid" width="1366" height="728" /></p>
<p dir="auto"><a href="/assets/uploads/files/smf/0000000001739-agent_log.txt">agent log.txt</a></p>
<p dir="auto"><a href="/assets/uploads/files/smf/0000000001740-server_log.txt">server log.txt</a></p>
]]></description><link>https://forum.netxms.org/post/13886</link><guid isPermaLink="true">https://forum.netxms.org/post/13886</guid><dc:creator><![CDATA[Nikk]]></dc:creator><pubDate>Wed, 14 May 2014 07:39:50 GMT</pubDate></item><item><title><![CDATA[Reply to Log parsing on Mon, 12 May 2014 16:55:23 GMT]]></title><description><![CDATA[<p dir="auto">I'm a bit lost - are you sure this is log for parser mentioned in the beginning? From this log file I see that parser correctly found matching line (using StatusPoll.* pattern) and generate event. Parser in the first post had different matching pattern. Let's try to combine everything related in one post - server log and agent log for same time period plus actual parser definition.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/13883</link><guid isPermaLink="true">https://forum.netxms.org/post/13883</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Mon, 12 May 2014 16:55:23 GMT</pubDate></item><item><title><![CDATA[Reply to Log parsing on Mon, 12 May 2014 07:59:04 GMT]]></title><description><![CDATA[<p dir="auto">Yes, sorry for wrong log, here is the agent log:</p>
<blockquote>
<p dir="auto">[12-May-2014 10:49:16.919] [DEBUG] LogParser: file size differs for stat(4) and fstat(C:\NetXMS\var\log), assume file rename<br />
[12-May-2014 10:49:16.919] [DEBUG] LogParser: file "C:\NetXMS\var\log" (pattern "C:\NetXMS\var\log") successfully opened<br />
[12-May-2014 10:49:16.919] [DEBUG] LogParser: parsing existing records in file "C:\NetXMS\var\log"<br />
[12-May-2014 10:49:16.935] [DEBUG] Match line: "[12-May-2014 06:19:48.093] [DEBUG] Node::createAgentConnection(Proxy) [383]): conn=0000000002827EB0"<br />
[12-May-2014 10:49:16.935] [DEBUG] checking rule 1 ""<br />
[12-May-2014 10:49:16.935] [DEBUG]   rule has no context<br />
[12-May-2014 10:49:16.935] [DEBUG]   matching against regexp (StatusPoll.*)<br />
[12-May-2014 10:49:16.935] [DEBUG]   no match<br />
[12-May-2014 10:49:16.935] [DEBUG] Processing stopped at end of rules list; result = false<br />
[12-May-2014 10:49:16.951] [DEBUG] Match line: "[12-May-2014 06:19:48.124] [DEBUG] StatusPoll(JURM [430]): boot time set to 1395223729 from agent"<br />
[12-May-2014 10:49:16.951] [DEBUG] checking rule 1 ""<br />
[12-May-2014 10:49:16.951] [DEBUG]   rule has no context<br />
[12-May-2014 10:49:16.951] [DEBUG]   matching against regexp (StatusPoll.*)<br />
[12-May-2014 10:49:16.951] [DEBUG]   matched<br />
[12-May-2014 10:49:16.951] [DEBUG] SendTrap(): event_code=100049, event_name=(null), num_args=0, arg[0]="(null)" arg[1]="(null)" arg[2]="(null)"<br />
[12-May-2014 10:49:16.951] [DEBUG] rule 1 "" matched<br />
[12-May-2014 10:49:16.951] [DEBUG] processing stopped at rule 1 ""; result = true</p>
</blockquote>
<p dir="auto">And DebugLevel in agent conf file doesn't work (or maybe i need to set something else?)</p>
]]></description><link>https://forum.netxms.org/post/13869</link><guid isPermaLink="true">https://forum.netxms.org/post/13869</guid><dc:creator><![CDATA[Nikk]]></dc:creator><pubDate>Mon, 12 May 2014 07:59:04 GMT</pubDate></item><item><title><![CDATA[Reply to Log parsing on Wed, 07 May 2014 15:12:01 GMT]]></title><description><![CDATA[<p dir="auto">It seems to be server log but I need agent log (because problem is on agent side - server just process events coming from agent).</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/13817</link><guid isPermaLink="true">https://forum.netxms.org/post/13817</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Wed, 07 May 2014 15:12:01 GMT</pubDate></item><item><title><![CDATA[Reply to Log parsing on Wed, 07 May 2014 10:52:59 GMT]]></title><description><![CDATA[<p dir="auto">I added trace 9 and runned debug mode 9, please see attachment.</p>
<hr />
<p dir="auto"><a href="/assets/uploads/files/smf/0000000001723-Log.txt">Log.txt</a></p>
]]></description><link>https://forum.netxms.org/post/13809</link><guid isPermaLink="true">https://forum.netxms.org/post/13809</guid><dc:creator><![CDATA[Nikk]]></dc:creator><pubDate>Wed, 07 May 2014 10:52:59 GMT</pubDate></item><item><title><![CDATA[Reply to Log parsing on Wed, 07 May 2014 09:07:49 GMT]]></title><description><![CDATA[<p dir="auto">Please try to run agent in debug mode 9 and add trace="9" to parser tag (like &lt;parser trace="9"&gt;) and provide agent's log.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/13806</link><guid isPermaLink="true">https://forum.netxms.org/post/13806</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Wed, 07 May 2014 09:07:49 GMT</pubDate></item><item><title><![CDATA[Reply to Log parsing on Wed, 07 May 2014 08:49:06 GMT]]></title><description><![CDATA[<p dir="auto">Is there anything I can do? Spamming hasn't stopped.<br />
Maybe i need to give more information?</p>
]]></description><link>https://forum.netxms.org/post/13805</link><guid isPermaLink="true">https://forum.netxms.org/post/13805</guid><dc:creator><![CDATA[Nikk]]></dc:creator><pubDate>Wed, 07 May 2014 08:49:06 GMT</pubDate></item><item><title><![CDATA[Reply to Log parsing on Mon, 28 Apr 2014 08:57:26 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">here is a part of log file (there is no error messages), but I'm trying this only as exercise. Actual file i wish to parse ir backup systems log file, where i wish to parse error messages.</p>
<blockquote>
<p dir="auto">[28-Apr-2014 11:52:49.631] [DEBUG] StatusPoll(KURMIS): bAllDown=false, dynFlags=0x00001001<br />
[28-Apr-2014 11:52:49.631] [DEBUG] StatusPoll(KURMIS [786]): unable to get system uptime<br />
[28-Apr-2014 11:52:49.631] [DEBUG] StatusPoll(LAPSA): bAllDown=false, dynFlags=0x00001001<br />
[28-Apr-2014 11:52:49.631] [DEBUG] StatusPoll(KURMIS [786]): unable to get agent uptime<br />
[28-Apr-2014 11:52:49.631] [DEBUG] Finished status poll for node KURMIS (ID: 786)<br />
[28-Apr-2014 11:52:49.631] [DEBUG] StatusPoll(LAPSA [783]): unable to get system uptime<br />
[28-Apr-2014 11:52:49.631] [DEBUG] StatusPoll(LAPSA [783]): unable to get agent uptime<br />
[28-Apr-2014 11:52:49.631] [DEBUG] Finished status poll for node LAPSA (ID: 783)<br />
[28-Apr-2014 11:52:49.631] [DEBUG] StatusPoll(PELE): bAllDown=false, dynFlags=0x00001001<br />
[28-Apr-2014 11:52:49.631] [DEBUG] StatusPoll(PELE [788]): unable to get system uptime<br />
[28-Apr-2014 11:52:49.631] [DEBUG] StatusPoll(PELE [788]): unable to get agent uptime<br />
[28-Apr-2014 11:52:49.631] [DEBUG] Finished status poll for node PELE (ID: 788)<br />
[28-Apr-2014 11:52:49.646] [DEBUG] StatusPoll(192.168.44.254): bAllDown=false, dynFlags=0x00001001<br />
[28-Apr-2014 11:52:49.646] [DEBUG] Node::createAgentConnection(Proxy [383])<br />
[28-Apr-2014 11:52:49.646] [DEBUG] Routing table updated for node TUKU [461]<br />
[28-Apr-2014 11:52:49.646] [DEBUG] Node::createAgentConnection(Proxy [383]): conn=00000000096BC610<br />
[28-Apr-2014 11:52:49.834] [DEBUG] Node::createAgentConnection(Proxy [383])<br />
[28-Apr-2014 11:52:49.834] [DEBUG] Node::createAgentConnection(Proxy [383])<br />
[28-Apr-2014 11:52:49.849] [DEBUG] Node::createAgentConnection(Proxy [383]): conn=0000000009578E40<br />
[28-Apr-2014 11:52:49.865] [DEBUG] Routing table updated for node Liepaja [407]<br />
[28-Apr-2014 11:52:49.865] [DEBUG] Node::createAgentConnection(Proxy [383]): conn=00000000092EA150<br />
[28-Apr-2014 11:52:49.912] [DEBUG] StatusPoll(BALV): bAllDown=false, dynFlags=0x00001001<br />
[28-Apr-2014 11:52:49.928] [DEBUG] StatusPoll(BALV [415]): boot time set to 1395040633 from agent<br />
[28-Apr-2014 11:52:49.928] [DEBUG] StatusPoll(valmiera): bAllDown=false, dynFlags=0x00001001<br />
[28-Apr-2014 11:52:49.959] [DEBUG] StatusPoll(valmiera [409]): boot time set to 1393231678 from agent<br />
[28-Apr-2014 11:52:49.959] [DEBUG] Finished status poll for node BALV (ID: 415)<br />
[28-Apr-2014 11:52:49.974] [DEBUG] Finished status poll for node valmiera (ID: 409)</p>
</blockquote>
<p dir="auto">But this event spam happens even if the log file is empty, so there must be something with the configuration, i think.<br />
Whatever i define in match section, it results in event spam.</p>
]]></description><link>https://forum.netxms.org/post/13744</link><guid isPermaLink="true">https://forum.netxms.org/post/13744</guid><dc:creator><![CDATA[Nikk]]></dc:creator><pubDate>Mon, 28 Apr 2014 08:57:26 GMT</pubDate></item><item><title><![CDATA[Reply to Log parsing on Mon, 28 Apr 2014 08:44:51 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">Can you share (part of) log file you are trying to monitor?</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/13743</link><guid isPermaLink="true">https://forum.netxms.org/post/13743</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Mon, 28 Apr 2014 08:44:51 GMT</pubDate></item><item><title><![CDATA[Reply to Log parsing on Mon, 28 Apr 2014 08:40:42 GMT]]></title><description><![CDATA[<p dir="auto">Windows event monitoring (*System etc.) works fine. But why doesn't the file option work?</p>
<p dir="auto">Regards,<br />
Nikk</p>
]]></description><link>https://forum.netxms.org/post/13742</link><guid isPermaLink="true">https://forum.netxms.org/post/13742</guid><dc:creator><![CDATA[Nikk]]></dc:creator><pubDate>Mon, 28 Apr 2014 08:40:42 GMT</pubDate></item></channel></rss>