<?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[AgentExecuteAction]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">I am trying to use the NXSL command "AgentExecuteAction".</p>
<p dir="auto">In the configuration file of my agent, I have placed:</p>
<pre><code>ExternalParameter = Test:echo test &gt; /tmp/test.txt
</code></pre>
<p dir="auto">This works very well on the command line:</p>
<pre><code>/opt/netxms/bin/nxget localhost 'Test

# more /tmp/test.txt
test
</code></pre>
<p dir="auto">So, I made a very small script  ;):</p>
<pre><code>AgentExecuteAction($node, "Test");
</code></pre>
<p dir="auto">I execute it...<br />
I can see the action in debug mode:</p>
<pre><code>  ** code=0x0043 (CMD_ACTION) version=5 flags=0x0000 id=4 size=56 numFields=3
  ** 000000: [    87] UTF8-STRING "Test"
  ** 000010: [   482] INT16       0
  ** 000018: [    88] INT32       0

2021.06.07 16:22:52.231 *D* [comm.cs.4          ] Received message CMD_ACTION (4)
2021.06.07 16:22:52.231 *D* [actions            ] ExecuteAction(Test): requestId=4, RCC=404
2021.06.07 16:22:52.231 *D* [comm.cs.4          ] Sending message CMD_REQUEST_COMPLETED (ID 4; size 32; uncompressed)
2021.06.07 16:22:52.231 *D* [comm.cs.4          ] Outgoing message dump:
  ** 000000 | 00 1D 50 00 00 00 00 20 00 00 00 04 00 00 00 01 | ..P.... ........
  ** 000010 | 00 00 00 1C 00 00 00 00 00 00 01 94 00 00 00 00 | ................
  ** code=0x001D (CMD_REQUEST_COMPLETED) version=5 flags=0x0000 id=4 size=32 numFields=1
  ** 000000: [    28] INT32       404

2021.06.07 16:22:52.231 *D* [comm.cs.4          ] Communication channel closed by peer
2021.06.07 16:22:52.231 *D* [comm.cs.4          ] Session with 129.20.128.4 closed
2021.06.07 16:22:52.231 *D* [comm.cs.4          ] Session unregistered
2021.06.07 16:22:52.231 *D* [comm.cs.4          ] Receiver thread stopped
</code></pre>
<p dir="auto">but it doesn't work ...</p>
<p dir="auto">Is it a syntax problem?<br />
A Parameter problem?</p>
<p dir="auto">Thanks<br />
BB</p>
]]></description><link>https://forum.netxms.org/topic/7076/agentexecuteaction</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 10:35:48 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/7076.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 07 Jun 2021 17:09:02 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to AgentExecuteAction on Tue, 08 Jun 2021 06:36:02 GMT]]></title><description><![CDATA[<p dir="auto">With AgentReadParameter it is perfect.<br />
Thank you.</p>
<p dir="auto">BB</p>
]]></description><link>https://forum.netxms.org/post/30117</link><guid isPermaLink="true">https://forum.netxms.org/post/30117</guid><dc:creator><![CDATA[BigBlue]]></dc:creator><pubDate>Tue, 08 Jun 2021 06:36:02 GMT</pubDate></item><item><title><![CDATA[Reply to AgentExecuteAction on Mon, 07 Jun 2021 19:50:31 GMT]]></title><description><![CDATA[<p dir="auto">There are two things that can be configured on agent:</p>
<ul>
<li>ExternalParameter (gets executed when server or nxget is requesting the value from agent. Or with AgentReadParameter() from NXSL)</li>
<li>ExternalAction (gets executed by nxaction, server action (e.g. from EPP rule) or NXSL AgentExecuteAction</li>
</ul>
]]></description><link>https://forum.netxms.org/post/30116</link><guid isPermaLink="true">https://forum.netxms.org/post/30116</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Mon, 07 Jun 2021 19:50:31 GMT</pubDate></item></channel></rss>