<?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[External Parameter fail for agent daemon mode]]></title><description><![CDATA[<p dir="auto">Hi All,</p>
<p dir="auto">I'm using external parameters in nxagentd.conf file, one of them:</p>
<p dir="auto">ExternalParameter = CF2PRIVATEMEM:privatemem.sh</p>
<p dir="auto">If I launch nxagentd -f -D 9  it executes and reads the parameter correctly</p>
<p dir="auto">[12-Aug-2016 14:30:59.404] [DEBUG] [session:0] Received message CMD_GET_PARAMETER<br />
[12-Aug-2016 14:30:59.404] [DEBUG] [session:0] Requesting parameter "CF2PRIVATEMEM"<br />
[12-Aug-2016 14:30:59.404] [DEBUG] H_ExternalParameter called for "CF2PRIVATEMEM" "<a href="http://Eprivatemem.sh" rel="nofollow ugc">Eprivatemem.sh</a>"<br />
[12-Aug-2016 14:30:59.404] [DEBUG] RunExternal called for "CF2PRIVATEMEM" "<a href="http://Eprivatemem.sh" rel="nofollow ugc">Eprivatemem.sh</a>"<br />
[12-Aug-2016 14:30:59.404] [DEBUG] RunExternal: command line is "<a href="http://privatemem.sh" rel="nofollow ugc">privatemem.sh</a>"<br />
[12-Aug-2016 14:30:59.405] [DEBUG] RunExternal (shell exec): worker thread created<br />
[12-Aug-2016 14:30:59.502] [DEBUG] H_ExternalParameter/POpenWorker: worker thread pipe read result: 0x7f8e8f5a5d70<br />
[12-Aug-2016 14:30:59.503] [DEBUG] RunExternal (shell exec): execution status 0<br />
[12-Aug-2016 14:30:59.503] [DEBUG] [session:0] GetParameterValue(): result is 0 (SUCCESS)<br />
[12-Aug-2016 14:30:59.503] [DEBUG] [session:0] Sending message CMD_REQUEST_COMPLETED (size 56)<br />
[12-Aug-2016 14:30:59.503] [DEBUG] [session:0] Outgoing message dump:<br />
  ** 001D0000000000380000001800000002<br />
  ** 0000001C000000000000000000000000<br />
  ** 00000015010000000000000C00340037<br />
  ** 0037003300310032<br />
  ** code=0x001D (CMD_REQUEST_COMPLETED) flags=0x0000 id=24 size=56 numFields=2<br />
  ** [    28] INT32    0<br />
  ** [    21] STRING   "477312"</p>
<p dir="auto">However if I launch in daemon mode nxagentd -d -D 9  then I get the following</p>
<p dir="auto">[12-Aug-2016 14:29:31.930] [DEBUG] [session:0] Received message CMD_GET_PARAMETER<br />
[12-Aug-2016 14:29:31.930] [DEBUG] [session:0] Requesting parameter "CF2PRIVATEMEM"<br />
[12-Aug-2016 14:29:31.930] [DEBUG] H_ExternalParameter called for "CF2PRIVATEMEM" "<a href="http://Eprivatemem.sh" rel="nofollow ugc">Eprivatemem.sh</a>"<br />
[12-Aug-2016 14:29:31.930] [DEBUG] RunExternal called for "CF2PRIVATEMEM" "<a href="http://Eprivatemem.sh" rel="nofollow ugc">Eprivatemem.sh</a>"<br />
[12-Aug-2016 14:29:31.930] [DEBUG] RunExternal: command line is "<a href="http://privatemem.sh" rel="nofollow ugc">privatemem.sh</a>"<br />
[12-Aug-2016 14:29:31.930] [DEBUG] RunExternal (shell exec): worker thread created<br />
[12-Aug-2016 14:29:31.936] [DEBUG] RunExternal (shell exec): execution status 0<br />
[12-Aug-2016 14:29:31.936] [DEBUG] [session:0] GetParameterValue(): result is 0 (SUCCESS)<br />
[12-Aug-2016 14:29:31.936] [DEBUG] [session:0] Sending message CMD_REQUEST_COMPLETED (size 48)<br />
[12-Aug-2016 14:29:31.936] [DEBUG] [session:0] Outgoing message dump:<br />
  ** 001D0000000000300000001900000002<br />
  ** 0000001C000000000000000000000000<br />
  ** 00000015010000000000000000000000<br />
  ** code=0x001D (CMD_REQUEST_COMPLETED) flags=0x0000 id=25 size=48 numFields=2<br />
  ** [    28] INT32    0<br />
  ** [    21] STRING   ""</p>
<p dir="auto">Which is wrong. Current version of server and agent is 2.0.5 and it does not work here.<br />
When I had version 1.2.17 it worked correctly.</p>
]]></description><link>https://forum.netxms.org/topic/4642/external-parameter-fail-for-agent-daemon-mode</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 12:15:09 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/4642.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 12 Aug 2016 11:41:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to External Parameter fail for agent daemon mode on Sat, 13 Aug 2016 04:13:22 GMT]]></title><description><![CDATA[<p dir="auto">This worked!</p>
<p dir="auto">Many thanks!</p>
]]></description><link>https://forum.netxms.org/post/20622</link><guid isPermaLink="true">https://forum.netxms.org/post/20622</guid><dc:creator><![CDATA[xatteg]]></dc:creator><pubDate>Sat, 13 Aug 2016 04:13:22 GMT</pubDate></item><item><title><![CDATA[Reply to External Parameter fail for agent daemon mode on Fri, 12 Aug 2016 21:09:55 GMT]]></title><description><![CDATA[<p dir="auto">Try to remove "Defaults requiretty" from /etc/sudoers</p>
]]></description><link>https://forum.netxms.org/post/20619</link><guid isPermaLink="true">https://forum.netxms.org/post/20619</guid><dc:creator><![CDATA[alk]]></dc:creator><pubDate>Fri, 12 Aug 2016 21:09:55 GMT</pubDate></item><item><title><![CDATA[Reply to External Parameter fail for agent daemon mode on Fri, 12 Aug 2016 15:50:17 GMT]]></title><description><![CDATA[<p dir="auto">I figured out that agent in daemon mode reacts with pain on sudo command in external script.<br />
E.g. if script contain something</p>
<p dir="auto">#!/bin/bash<br />
echo 300</p>
<p dir="auto">Than it works, but if we add sudo</p>
<p dir="auto">sudo -u someuser echo 300</p>
<p dir="auto">It does not. Did anyone run into this?</p>
]]></description><link>https://forum.netxms.org/post/20617</link><guid isPermaLink="true">https://forum.netxms.org/post/20617</guid><dc:creator><![CDATA[xatteg]]></dc:creator><pubDate>Fri, 12 Aug 2016 15:50:17 GMT</pubDate></item></channel></rss>