<?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[Problem with parameters for Agent Action (Linux-Server -> Win-Agent)]]></title><description><![CDATA[<p dir="auto">Hi everyone,</p>
<p dir="auto">I have a problem with executing an agent´s action via EPP and found also some strange behaviour on Linux, systems are:</p>
<ul>
<li>Server-Linux: Debian 9, NetXMS-Server 3.0.2357</li>
<li>Server-Windows: Server 2012 R2, NetXMS-Server 2.2.16</li>
<li>Agent-Windows: Server 2012 R2, NetXMS-Agent 3.0.2357</li>
</ul>
<p dir="auto">What i want is to execute a cmd-Script (send message) on the Windows-Agent, tested it with following config (nxagentd.conf)</p>
<pre><code>...
EnableActions = yes
Action = notify: C:\\Local\\Binw\\Notify_V3.cmd -S $1 -D $2 -M $3 -G $4 -L $5
...
</code></pre>
<p dir="auto">Using parameters for the action, things get strange on the Linux-Server:</p>
<pre><code>/bin/# ./nxaction -o 192.168.9.40 notify Test2 NetXMS E NetXMS2 LinNXACTION
</code></pre>
<p dir="auto"><strong>Working</strong>, i get mail:</p>
<pre><code>Executing action C:\\Local\\Binw\\Notify_V3.cmd -S Test -D NetXMS -M E -G NetXMS2 -L LinNXACTION of type 1
</code></pre>
<p dir="auto">Via Action + EPP, <strong>not working</strong>:</p>
<pre><code>Executing action C:\\Local\\Binw\\Notify_V3.cmd -S Test NetXMS E NetXMS2 LinEPP -D NetXMS E NetXMS2 LinEPP -M E NetXMS2 LinEPP -G NetXMS2 LinEPP -L LinEPP of type 1
</code></pre>
<p dir="auto">I tried almost 50 different versions of the config (using " or ' around single parameters, all parameters, escaping the parameters with \" an \' and so on), but i always get a result like the above.<br />
Seems there is an problem transmitting and escaping the string from Linux to Windows, because if i use same config from within Windows-Server i get (which is also not working):</p>
<pre><code>Executing action C:\\Local\\Binw\\Notify_V3.cmd -S Test -D NetXMS -M E -G NetXMS2 -L WinEPP of type 1
</code></pre>
<p dir="auto">So, is this a known problem or am i doing it wrong?<br />
And, has someone a working example of using an action with multiple parameters?</p>
<p dir="auto">Thanks</p>
<p dir="auto">Andreas</p>
]]></description><link>https://forum.netxms.org/topic/6301/problem-with-parameters-for-agent-action-linux-server-win-agent</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 12:22:35 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/6301.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 04 Dec 2019 12:26:02 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem with parameters for Agent Action (Linux-Server -> Win-Agent) on Wed, 05 Feb 2020 08:55:14 GMT]]></title><description><![CDATA[<p dir="auto">Hmm,</p>
<p dir="auto">still no progress despite further investigations.</p>
<p dir="auto">Executing the external action, this time without additional parameters, via nxaction works on Linux and Windows.<br />
Action executed via EPP does not work on Linux and Windows, there are missing around 220 lines in the log of the agent.</p>
<p dir="auto">So, is this a bug or am i calling the action wrong as stated above?</p>
<p dir="auto">Andreas</p>
<hr />
<p dir="auto"><a href="/assets/uploads/files/smf/0000000005027-Linux_Working_nxaction.txt">Linux_Working_nxaction.txt</a></p>
<p dir="auto"><a href="/assets/uploads/files/smf/0000000005028-Windows_Working_nxaction.txt">Windows_Working_nxaction.txt</a></p>
<p dir="auto"><a href="/assets/uploads/files/smf/0000000005029-Linux_NOT_Working_EPP.txt">Linux_NOT_Working_EPP.txt</a></p>
<p dir="auto"><a href="/assets/uploads/files/smf/0000000005030-Windows_NOT_Working_EPP.txt">Windows_NOT_Working_EPP.txt</a></p>
]]></description><link>https://forum.netxms.org/post/27329</link><guid isPermaLink="true">https://forum.netxms.org/post/27329</guid><dc:creator><![CDATA[Sack-C-Fix]]></dc:creator><pubDate>Wed, 05 Feb 2020 08:55:14 GMT</pubDate></item><item><title><![CDATA[Reply to Problem with parameters for Agent Action (Linux-Server -> Win-Agent) on Fri, 17 Jan 2020 14:04:52 GMT]]></title><description><![CDATA[<p dir="auto">Okay,</p>
<p dir="auto">tried a few things and found following behaviour.<br />
As mentioned above, executing action from CLI/CMD via nxaction on Agent (Windows) works from server (Windows and Linux).</p>
<p dir="auto">Executing the action via EPP only works on Windows-Server, seems Linux-Server can't find the correct action.<br />
Log-Files are attached, the first lines show command executed on server, followed by reaction on agent.</p>
<p dir="auto">Thanks<br />
Andreas</p>
<hr />
<p dir="auto"><a href="/assets/uploads/files/smf/0000000005016-action_linux.txt">action_linux.txt</a></p>
<p dir="auto"><a href="/assets/uploads/files/smf/0000000005017-action_win.txt">action_win.txt</a></p>
]]></description><link>https://forum.netxms.org/post/27290</link><guid isPermaLink="true">https://forum.netxms.org/post/27290</guid><dc:creator><![CDATA[Sack-C-Fix]]></dc:creator><pubDate>Fri, 17 Jan 2020 14:04:52 GMT</pubDate></item><item><title><![CDATA[Reply to Problem with parameters for Agent Action (Linux-Server -> Win-Agent) on Wed, 15 Jan 2020 12:13:37 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">Can we get some more details on how exactly it's not working? Can you may be try to call a command file, that logs parameters that it's receiving and show what is in netxms agent's log and what that command file gets?</p>
]]></description><link>https://forum.netxms.org/post/27277</link><guid isPermaLink="true">https://forum.netxms.org/post/27277</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Wed, 15 Jan 2020 12:13:37 GMT</pubDate></item><item><title><![CDATA[Reply to Problem with parameters for Agent Action (Linux-Server -> Win-Agent) on Wed, 15 Jan 2020 07:17:54 GMT]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">forgot to reply to your answer.<br />
With the new version at least the entry in the log-file seems correct, but executing the action is still not working.</p>
<p dir="auto">Has someone a working example of executing a script via nxagent?</p>
<p dir="auto">Thanks<br />
Andreas</p>
]]></description><link>https://forum.netxms.org/post/27273</link><guid isPermaLink="true">https://forum.netxms.org/post/27273</guid><dc:creator><![CDATA[Sack-C-Fix]]></dc:creator><pubDate>Wed, 15 Jan 2020 07:17:54 GMT</pubDate></item><item><title><![CDATA[Reply to Problem with parameters for Agent Action (Linux-Server -> Win-Agent) on Thu, 12 Dec 2019 09:03:59 GMT]]></title><description><![CDATA[<p dir="auto">As for the first problem with executing an agent´s action via EPP, it was fixed and should work in version 3.1.261 that was released yesterday. Could you please confirm that it works for you?</p>
<p dir="auto">There is currently no way to pass script arguments that have spaces from GUI's Server Console (and also from nxadm -c). Possible workarounds:</p>
<ul>
<li>use some special character, e.g. _ and replace it in the script</li>
<li>you can use nxscript command line utility, but it can not run scripts from server script library, the script should be in a file.</li>
</ul>
<pre><code>nxscript 1.nxs "1" "2 3"
</code></pre>
]]></description><link>https://forum.netxms.org/post/27135</link><guid isPermaLink="true">https://forum.netxms.org/post/27135</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Thu, 12 Dec 2019 09:03:59 GMT</pubDate></item><item><title><![CDATA[Reply to Problem with parameters for Agent Action (Linux-Server -> Win-Agent) on Thu, 12 Dec 2019 06:30:29 GMT]]></title><description><![CDATA[<p dir="auto">Hmm,<br />
maybe related to the problem (or i'm too stupid to use parameters correctly).</p>
<p dir="auto">If i execute a internal script via GUI's Server Console and pass multiple parameters, strings are split at blanks, even if enquoted by "".</p>
<p dir="auto">Example: <code>exec myScript 123 456 "Hello World"</code><br />
So for this i get $1 = 123, $2 = 456, $3 = "Hello, $4 = World", i was expecting to get the complete string for $3.</p>
<p dir="auto">Any thoughts on this?</p>
<p dir="auto">Andreas</p>
]]></description><link>https://forum.netxms.org/post/27133</link><guid isPermaLink="true">https://forum.netxms.org/post/27133</guid><dc:creator><![CDATA[Sack-C-Fix]]></dc:creator><pubDate>Thu, 12 Dec 2019 06:30:29 GMT</pubDate></item><item><title><![CDATA[Reply to Problem with parameters for Agent Action (Linux-Server -> Win-Agent) on Fri, 06 Dec 2019 13:36:36 GMT]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">Configs are in the files attached, I there also tried to escape ("", '', \", \') the parameters.<br />
Results stay the same, on Windows i get the correct parameter per string, on Linux the parameters are passed multiple times.</p>
<p dir="auto">Thanks</p>
<hr />
<p dir="auto"><img src="/assets/uploads/files/smf/0000000004971-Edit_action_Windows.jpg" alt="Edit action_Windows.jpg" class="img-markdown  img-fluid" width="336" height="464" /></p>
<p dir="auto"><img src="/assets/uploads/files/smf/0000000004973-Edit_action_Linux.jpg" alt="Edit action_Linux.jpg" class="img-markdown  img-fluid" width="322" height="496" /></p>
]]></description><link>https://forum.netxms.org/post/27062</link><guid isPermaLink="true">https://forum.netxms.org/post/27062</guid><dc:creator><![CDATA[Sack-C-Fix]]></dc:creator><pubDate>Fri, 06 Dec 2019 13:36:36 GMT</pubDate></item><item><title><![CDATA[Reply to Problem with parameters for Agent Action (Linux-Server -> Win-Agent) on Wed, 04 Dec 2019 20:17:28 GMT]]></title><description><![CDATA[<p dir="auto">Can you also provide how does action call is configured on server side: I mean server action (Configuration-&gt;Action Configuration), that calls agent action?</p>
]]></description><link>https://forum.netxms.org/post/27046</link><guid isPermaLink="true">https://forum.netxms.org/post/27046</guid><dc:creator><![CDATA[zev]]></dc:creator><pubDate>Wed, 04 Dec 2019 20:17:28 GMT</pubDate></item></channel></rss>