<?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[ExternalMetricProvider with agent version 5]]></title><description><![CDATA[<p dir="auto">I recently upgraded to NetXMS 5.0.6 (from 4.5.6) and it seems there is a problem with "ExternalMetricProvider" on the agent: I'm calling a few PowerShell-scripts with different execution intervals. After restart of the agent service everything seems fine and the scripts are executed as expected, but on the second call it is behaving strange: PowerShell stops executing in the middle of the script and in the agent log I find that the external command is killed because of ExternalMetricProviderTimeout, but actually the PowerShell process is still running in the background. The external command is not exected again after that.<br />
I downgraded the agent to 4.5.6 and it is working as expected again.</p>
]]></description><link>https://forum.netxms.org/topic/7997/externalmetricprovider-with-agent-version-5</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 15:21:18 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/7997.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 13 Aug 2024 14:55:44 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to ExternalMetricProvider with agent version 5 on Fri, 06 Sep 2024 11:49:01 GMT]]></title><description><![CDATA[<p dir="auto">Just upgraded to 5.0.8 and everything looks fine again, thank you!</p>
]]></description><link>https://forum.netxms.org/post/33765</link><guid isPermaLink="true">https://forum.netxms.org/post/33765</guid><dc:creator><![CDATA[flytech-ben]]></dc:creator><pubDate>Fri, 06 Sep 2024 11:49:01 GMT</pubDate></item><item><title><![CDATA[Reply to ExternalMetricProvider with agent version 5 on Mon, 19 Aug 2024 10:05:40 GMT]]></title><description><![CDATA[<p dir="auto">Windows Server 2022 and PowerShell-7.4.4-win-x64.msi</p>
]]></description><link>https://forum.netxms.org/post/33711</link><guid isPermaLink="true">https://forum.netxms.org/post/33711</guid><dc:creator><![CDATA[flytech-ben]]></dc:creator><pubDate>Mon, 19 Aug 2024 10:05:40 GMT</pubDate></item><item><title><![CDATA[Reply to ExternalMetricProvider with agent version 5 on Mon, 19 Aug 2024 10:04:09 GMT]]></title><description><![CDATA[<p dir="auto">So which exactly powershell you use and on what OS this is?</p>
]]></description><link>https://forum.netxms.org/post/33710</link><guid isPermaLink="true">https://forum.netxms.org/post/33710</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Mon, 19 Aug 2024 10:04:09 GMT</pubDate></item><item><title><![CDATA[Reply to ExternalMetricProvider with agent version 5 on Mon, 19 Aug 2024 09:53:15 GMT]]></title><description><![CDATA[<p dir="auto">Sure, but the script does almost nothing.</p>
<pre><code>Start-Transcript -Path "$($PSScriptRoot)\$(Split-Path $PSCommandPath -Leaf).log" | Out-Null
Start-Sleep -Seconds 15
Stop-Transcript | Out-Null
</code></pre>
<p dir="auto">On the system is the most recent version of PowerShell installed, currently 7.4.4 (I'm not using <em>Windows</em> PowerShell).<br />
<a href="https://github.com/PowerShell/PowerShell" rel="nofollow ugc">https://github.com/PowerShell/PowerShell</a></p>
]]></description><link>https://forum.netxms.org/post/33709</link><guid isPermaLink="true">https://forum.netxms.org/post/33709</guid><dc:creator><![CDATA[flytech-ben]]></dc:creator><pubDate>Mon, 19 Aug 2024 09:53:15 GMT</pubDate></item><item><title><![CDATA[Reply to ExternalMetricProvider with agent version 5 on Mon, 19 Aug 2024 08:37:11 GMT]]></title><description><![CDATA[<p dir="auto">Can you actually share your powershell script (or some version of it with which gives same results).<br />
Also, what's the version of powershell itself - it might make some difference.</p>
]]></description><link>https://forum.netxms.org/post/33708</link><guid isPermaLink="true">https://forum.netxms.org/post/33708</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Mon, 19 Aug 2024 08:37:11 GMT</pubDate></item><item><title><![CDATA[Reply to ExternalMetricProvider with agent version 5 on Fri, 16 Aug 2024 15:37:44 GMT]]></title><description><![CDATA[<p dir="auto">Yes, the problem still happens with one script (second ExternalMetricProvider removed).<br />
No, the process pwsh.exe is not running after the script is finished in this test-setup. The PowerShell-file was empty before and I added 10 seconds of delay, but it does not change the behavior.</p>
]]></description><link>https://forum.netxms.org/post/33707</link><guid isPermaLink="true">https://forum.netxms.org/post/33707</guid><dc:creator><![CDATA[flytech-ben]]></dc:creator><pubDate>Fri, 16 Aug 2024 15:37:44 GMT</pubDate></item><item><title><![CDATA[Reply to ExternalMetricProvider with agent version 5 on Thu, 15 Aug 2024 15:23:01 GMT]]></title><description><![CDATA[<p dir="auto">I see you have two external metric providers configured. Does the problem still happen if you remove the second one?</p>
<p dir="auto">Can you also check with Windows Task manager, if between this line<br />
2024.08.14 16:18:01.182 *D* [procexec.2        ] ProcessExecutor::executeWithOutput(): process "CMD.EXE /C pwsh.exe -NoProfile C:\\NetXMS\\var\\test1.ps1" started (PID=2020)</p>
<p dir="auto">and that line<br />
2024.08.14 16:18:31.185 *D* [ext.provider      ] ExternalDataProvider::poll(): command "pwsh.exe -NoProfile C:\\NetXMS\\var\\test1.ps1" execution timeout (30000 milliseconds)</p>
<p dir="auto">pwsh.exe -NoProfile C:\\NetXMS\\var\\test1.ps1<br />
process is actually running, or it has already terminated? I'd try to add say 10 second delay inside test1.ps1, then it would be seen in Task Manager that this process starts and when it ends.</p>
]]></description><link>https://forum.netxms.org/post/33706</link><guid isPermaLink="true">https://forum.netxms.org/post/33706</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Thu, 15 Aug 2024 15:23:01 GMT</pubDate></item><item><title><![CDATA[Reply to ExternalMetricProvider with agent version 5 on Wed, 14 Aug 2024 14:29:20 GMT]]></title><description><![CDATA[<p dir="auto">I created a minimal test-setup and it still happens. It seems the agent crashes on stopping the Windows service.</p>
<hr />
<p dir="auto"><a href="/assets/uploads/files/smf/0000000006720-nxagentd.log">nxagentd.log</a></p>
]]></description><link>https://forum.netxms.org/post/33703</link><guid isPermaLink="true">https://forum.netxms.org/post/33703</guid><dc:creator><![CDATA[flytech-ben]]></dc:creator><pubDate>Wed, 14 Aug 2024 14:29:20 GMT</pubDate></item><item><title><![CDATA[Reply to ExternalMetricProvider with agent version 5 on Tue, 13 Aug 2024 17:50:58 GMT]]></title><description><![CDATA[<p dir="auto">Can you please enable<br />
DebugLevel = 7<br />
in agent configuration file and set it to log to file<br />
LogFile = /path/to/log/file</p>
<p dir="auto">let it run until it finishes second call of the script and share the log (you can sent it to me as private message if needed)</p>
]]></description><link>https://forum.netxms.org/post/33702</link><guid isPermaLink="true">https://forum.netxms.org/post/33702</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Tue, 13 Aug 2024 17:50:58 GMT</pubDate></item></channel></rss>