<?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[[Solved] Log Parser - Failed to start when ExternalParameter]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">It seems I have some conflict between the log parser and the ExternalParameter definition in a node configuration.<br />
could you, please, let me know if I do sth wrong here?</p>
<p dir="auto">Here is the agent log file when the following ExternalParameterShellExec is defined:<br />
ExternalParameterShellExec = TCP.SocketStatus(*):/home/netxms/scripts/socket_status.pl $1 $2 $3 $4</p>
<p dir="auto"><strong>Log file content:</strong></p>
<p dir="auto">[18-Jun-2009 17:21:41] Debug: Executing action Agent.Restart of type 2<br />
[18-Jun-2009 17:21:41] Debug: EXEC: Expanding command ""/usr/local/bin/nxagentd" -c "/etc/nxagentd.conf" -d -D -X 12677"<br />
[18-Jun-2009 17:21:41] Debug: EXEC: Executing ""/usr/local/bin/nxagentd" -c "/etc/nxagentd.conf" -d -D -X 12677"<br />
[18-Jun-2009 17:21:41] Debug: {1} Sending message CMD_REQUEST_COMPLETED (size 32)<br />
[18-Jun-2009 17:21:41] Debug: {1} Session with 10.10.64.125 closed<br />
[18-Jun-2009 17:21:41] Debug: Trap sender thread terminated<br />
[18-Jun-2009 17:21:41] Debug: {0} Session with 10.10.64.125 closed<br />
[18-Jun-2009 17:21:42] Debug: Session Watchdog thread terminated<br />
[18-Jun-2009 17:21:42] Debug: Listener thread terminated<br />
[18-Jun-2009 17:21:42] NetXMS Agent stopped</p>
<p dir="auto">[18-Jun-2009 17:21:43] Log file opened<br />
[18-Jun-2009 17:21:43] Debug: Log file opened<br />
[18-Jun-2009 17:21:43] Debug: Subagent API initialized<br />
[18-Jun-2009 17:21:44] Subagent "/usr/local/lib/libnsm_linux.so" loaded successfully<br />
[18-Jun-2009 17:21:44] Initialization of subagent "/usr/local/lib/libnsm_logwatch.so" failed<br />
[18-Jun-2009 17:21:45] Debug: Trying to bind on 0.0.0.0:4700<br />
[18-Jun-2009 17:21:45] Listening on socket 0.0.0.0:4700<br />
[18-Jun-2009 17:21:46] NetXMS Agent started<br />
[18-Jun-2009 17:21:49] Debug: Incoming connection from 10.10.64.125<br />
[18-Jun-2009 17:21:49] Debug: Connection from 10.10.64.125 accepted<br />
[18-Jun-2009 17:21:49] Debug: {0} Received control message CMD_GET_NXCP_CAPS<br />
[18-Jun-2009 17:21:49] Debug: {0} Sending message CMD_NXCP_CAPS (size 16)<br />
[18-Jun-2009 17:21:49] Debug: {0} Received message CMD_KEEPALIVE</p>
<p dir="auto">One can easily see that logwatch subagent fails to initialize<br />
If I remove the ExternalParameterShellExec fro mteh config file (commented out) here is the outcome:</p>
<p dir="auto">[18-Jun-2009 17:24:18] Debug: EXEC: Executing ""/usr/local/bin/nxagentd" -c "/etc/nxagentd.conf" -d -D -X 13173"<br />
[18-Jun-2009 17:24:18] Debug: {1} Sending message CMD_REQUEST_COMPLETED (size 32)<br />
[18-Jun-2009 17:24:18] Debug: {1} Session with 10.10.64.125 closed<br />
[18-Jun-2009 17:24:18] Debug: Trap sender thread terminated<br />
[18-Jun-2009 17:24:18] Debug: {0} Session with 10.10.64.125 closed<br />
[18-Jun-2009 17:24:19] Debug: Session Watchdog thread terminated<br />
[18-Jun-2009 17:24:19] Debug: Listener thread terminated<br />
[18-Jun-2009 17:24:19] NetXMS Agent stopped</p>
<p dir="auto">[18-Jun-2009 17:24:20] Log file opened<br />
[18-Jun-2009 17:24:20] Debug: Log file opened<br />
[18-Jun-2009 17:24:20] Debug: Subagent API initialized<br />
[18-Jun-2009 17:24:21] Subagent "/usr/local/lib/libnsm_linux.so" loaded successfully<br />
[18-Jun-2009 17:24:21] Debug: LogWatch: registered parser for file /home/dk/out.txt, trace level set to 0<br />
[18-Jun-2009 17:24:21] Subagent "/usr/local/lib/libnsm_logwatch.so" loaded successfully<br />
[18-Jun-2009 17:24:21] Debug: LogParser: parser thread for file "/home/dk/out.txt" started<br />
[18-Jun-2009 17:24:21] Debug: LogParser: file "/home/dk/out.txt" successfully opened<br />
[18-Jun-2009 17:24:22] Debug: Trying to bind on 0.0.0.0:4700<br />
[18-Jun-2009 17:24:22] Listening on socket 0.0.0.0:4700</p>
<p dir="auto">Subagent logwatch successfully loaded.<br />
Here is the <strong>config for the logwatch</strong>:</p>
<p dir="auto">SubAgent = /usr/local/lib/libnsm_logwatch.so<br />
*LOGWATCH<br />
Parser = /home/netxms/parser/my_script_out.xml</p>
<p dir="auto">Many thanks in advance fro your support.<br />
Best regards,</p>
<p dir="auto">Jdamien</p>
]]></description><link>https://forum.netxms.org/topic/658/solved-log-parser-failed-to-start-when-externalparameter</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 10:35:11 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/658.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 18 Jun 2009 15:33:23 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [Solved] Log Parser - Failed to start when ExternalParameter on Sun, 21 Jun 2009 13:45:08 GMT]]></title><description><![CDATA[<p dir="auto">Lines started with * character defines a new config section (usually subagent configuration) - and parameters allowed in each section are specific to this section. Core agent parameters should be defined in "default" section - unnamed section in the beginning of the file. Order within section is not important.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/3142</link><guid isPermaLink="true">https://forum.netxms.org/post/3142</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Sun, 21 Jun 2009 13:45:08 GMT</pubDate></item><item><title><![CDATA[Reply to [Solved] Log Parser - Failed to start when ExternalParameter on Fri, 19 Jun 2009 14:05:12 GMT]]></title><description><![CDATA[<p dir="auto">Hehehe  ;D I found the fix...</p>
<p dir="auto">I'm sure many will come across that one as well so hope you'll find this post quickly and not waste too much of your time on this issue.</p>
<p dir="auto">Well basically, it is just about defining the things according to a certain order in the agent config file. Unfortunately I cannot explain why but probably our NetXMS gurus will do later on...</p>
<p dir="auto">This is how I defined it in my agent config file.<br />
The only difference is that ExternalParameterShellExec is defined RIGHT after the subagent declaration. Then and only then comes the logwatch subagent declaration.</p>
<p dir="auto"><strong>Agent config file extract:</strong><br />
SubAgent = /usr/local/lib/libnsm_linux.so<br />
ExternalParameterShellExec = TCP.SocketStatus(*):/home/netxms/scripts/socket_status.pl $1 $2</p>
<p dir="auto">SubAgent = /usr/local/lib/libnsm_logwatch.so<br />
*LOGWATCH<br />
Parser = /home/netxms/parser/log_parser_n2p.xml</p>
<p dir="auto"><strong>Agent log file extract:</strong><br />
[19-Jun-2009 15:57:39] Log file opened<br />
[19-Jun-2009 15:57:39] Debug: Log file opened<br />
[19-Jun-2009 15:57:39] Debug: Subagent API initialized<br />
[19-Jun-2009 15:57:40] Subagent "/usr/local/lib/libnsm_linux.so" loaded successfully<br />
[19-Jun-2009 15:57:40] Subagent "Linux" already loaded from module "/usr/local/lib/libnsm_linux.so"<br />
[19-Jun-2009 15:57:40] Debug: LogWatch: registered parser for file /home/dk/out.txt, trace level set to 0<br />
[19-Jun-2009 15:57:40] Subagent "/usr/local/lib/libnsm_logwatch.so" loaded successfully<br />
[19-Jun-2009 15:57:40] Debug: LogParser: parser thread for file "/home/dk/out.txt" started<br />
[19-Jun-2009 15:57:40] Debug: LogParser: file "/home/dk/out.txt" successfully opened<br />
[19-Jun-2009 15:57:41] Debug: Trying to bind on 0.0.0.0:4700<br />
[19-Jun-2009 15:57:41] Listening on socket 0.0.0.0:4700<br />
[19-Jun-2009 15:57:42] NetXMS Agent started<br />
...</p>
<p dir="auto">Hope this will be of any value to someone else.</p>
<p dir="auto">Regards &amp; Have fun<br />
Jdamien</p>
]]></description><link>https://forum.netxms.org/post/3135</link><guid isPermaLink="true">https://forum.netxms.org/post/3135</guid><dc:creator><![CDATA[jdl]]></dc:creator><pubDate>Fri, 19 Jun 2009 14:05:12 GMT</pubDate></item></channel></rss>