<?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] ActionShellExec Confusion...]]></title><description><![CDATA[<p dir="auto">I am trying to do a simple update of node status into a MS-SQL server when the status on a node changes.  I have written a really simply .cmd file to handle passing in the hostname, ip address, status and comment.  Can run this from the command prompt on the server and it works as expected.</p>
<p dir="auto">On the server running the agent we have the following:</p>
<pre><code>ActionShellExec = Sql.StatusUpdate:D:\nodeUpdate.cmd $1 $2 $3 $4
</code></pre>
<p dir="auto">If I enable debugging on the agent can see this is getting fired off:</p>
<pre><code>2022.02.18 13:06:23.802 *D* [comm.cs.232        ] Received message CMD_ACTION (4)
2022.02.18 13:06:23.811 *D* [procexec           ] ProcessExecutor::execute(): process "CMD.EXE /C D:\nodeUpdate.cmd host.com 1.2.3.4 down Yikes" started
2022.02.18 13:06:23.812 *D* [actions            ] Execution of external action Sql.StatusUpdate (D:\nodeUpdate.cmd host.com 1.2.3.4 down Yikes) started
2022.02.18 13:06:23.812 *D* [actions            ] ExecuteAction(Sql.StatusUpdate): requestId=4, RCC=0
2022.02.18 13:06:23.812 *D* [comm.cs.232        ] Sending message CMD_REQUEST_COMPLETED (ID 4; size 32; uncompressed)
</code></pre>
<p dir="auto">One of the first thing the script does is echo the parameters to a temporary file, so we have some history.  That is never getting triggered and definitely the sqlcmd statement in the script is not running.  Have been pulling my hair out for a while and cannot figure out why this is not working.</p>
<p dir="auto">Ideally, though at this point becoming less of a bid deal that last parameter should allow for a string with spaces.  That at this point is icing on the cake, just want it working.</p>
<p dir="auto">Thoughts?</p>
]]></description><link>https://forum.netxms.org/topic/7306/solved-actionshellexec-confusion...</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 12:15:00 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/7306.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 18 Feb 2022 18:23:38 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [SOLVED] ActionShellExec Confusion... on Wed, 02 Mar 2022 19:22:03 GMT]]></title><description><![CDATA[<p dir="auto">The previous posts were all running in <a href="http://3.9.xxx" rel="nofollow ugc">3.9.xxx</a> (I believe 420).  We have upgraded now to 4.0.2157 and we are not having issues any longer with this.</p>
]]></description><link>https://forum.netxms.org/post/31104</link><guid isPermaLink="true">https://forum.netxms.org/post/31104</guid><dc:creator><![CDATA[lweidig]]></dc:creator><pubDate>Wed, 02 Mar 2022 19:22:03 GMT</pubDate></item><item><title><![CDATA[Reply to [SOLVED] ActionShellExec Confusion... on Wed, 02 Mar 2022 07:20:57 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">what server version you are using? Also, try to set debug level to 5 on server and check server log for lines starting with NXSL: F_AgentExecuteAction.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/31093</link><guid isPermaLink="true">https://forum.netxms.org/post/31093</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Wed, 02 Mar 2022 07:20:57 GMT</pubDate></item><item><title><![CDATA[Reply to [SOLVED] ActionShellExec Confusion... on Mon, 28 Feb 2022 20:22:27 GMT]]></title><description><![CDATA[<p dir="auto">Following up on my own post, but still hoping for some clarity.  This fails running <strong>AgentExecuteAction</strong> on the node, but works if I run <strong>nxaction</strong> from the server command line.  The exact calls are as follows:</p>
<p dir="auto">Does not work:</p>
<pre><code>AgentExecuteAction($node, "Sql.StatusUpdate","host.com","1.2.3.4","down","YIKES");
</code></pre>
<hr />
<p dir="auto">Works:</p>
<pre><code>nxaction -s NOTTREALKEYHERE -o sql.host.com "Sql.StatusUpdate" "host.com" "1.2.3.4" "down" "YIKES"
</code></pre>
<p dir="auto">Maybe AgentExecuteAction does not handle shared secrets properly?</p>
]]></description><link>https://forum.netxms.org/post/31088</link><guid isPermaLink="true">https://forum.netxms.org/post/31088</guid><dc:creator><![CDATA[lweidig]]></dc:creator><pubDate>Mon, 28 Feb 2022 20:22:27 GMT</pubDate></item></channel></rss>