<?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[How to use the External List and ExternalMetricProvider correctly?]]></title><description><![CDATA[<p dir="auto">Good day! <br />
I added an External List and an ExternalMetricProvider to the agent configuration file.:</p>
<p dir="auto"><em>ExternalList = RaidController: powershell.exe -NoLogo -STA -NoProfile</em><br />
<em>-NonInteractive -File "C:\Backup\StartRI.ps1" -List</em></p>
<p dir="auto"><em>ExternalMetricProvider = powershell.exe -NoLogo -STA -NoProfile</em><br />
<em>-NonInteractive -File "C:\Backup\StartRI.ps1":600</em></p>
<p dir="auto">Test script for getting controller parameters:</p>
<p dir="auto">$PSCommandPath = "C:\Backup\C_Model.ps1"<br />
Start-Process powershell -ArgumentList '-NoProfile -NonInteractive -ExecutionPolicy Bypass -File "C:\Backup\C_Model.ps1'<br />
-Verb RunAs<br />
$prefix = 'Product Name'<br />
$ExecuteStoreCLI = Get-Content -Path 'C:\Backup\Storcli\Windows\RaidInfo.txt' -Raw<br />
$ArrayStorCli = ConvertFrom-Json  $ExecuteStoreCLI<br />
$reportLine = ([String]::Format("{0} ={1}",<br />
            $prefix,<br />
            $ArrayStorCli.Controllers.'Response data'.'Product Name'       <br />
))<br />
Write-Output  $reportLine</p>
<p dir="auto">The script returns a string like:<br />
<em><strong>Product Name = AVAGO MegaRAID SAS 9440-8i</strong></em></p>
<p dir="auto"><img src="https://i.postimg.cc/zGgTbdPx/1.jpg" alt="" class="img-markdown  img-fluid" /><br />
The question is this: How do I make the result, a row named "AVAGO MegaRAID SAS 9440-8i" appear in the "Value" column? For me, all the results are recorded only in the "Description" column, regardless of whether it is numeric or string data. What format should I output the string from the script in order to get the correct Key\Value for ExternalMetricProvider?</p>
<p dir="auto">Metrica Settings:</p>
<p dir="auto"><img src="https://i.postimg.cc/GpzPd4fR/2.jpg" alt="" class="img-markdown  img-fluid" /><img src="https://i.postimg.cc/x1ntQVdK/3.jpg" alt="" class="img-markdown  img-fluid" /></p>
]]></description><link>https://forum.netxms.org/topic/8118/how-to-use-the-external-list-and-externalmetricprovider-correctly</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 12:31:14 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/8118.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 13 Mar 2025 06:47:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to use the External List and ExternalMetricProvider correctly? on Tue, 18 Mar 2025 13:59:24 GMT]]></title><description><![CDATA[<p dir="auto">The script that is ran as ExternalList should just produce name of some things, one name for each line. E.g. if these are raid controllers then it could be something like:</p>
<p dir="auto">raid1<br />
raid2</p>
<p dir="auto">Then, when instance discovery happens on that node, it will create DCIs with metrics:</p>
<p dir="auto">RaidControllerInfo(raid1)<br />
RaidControllerInfo(raid2)</p>
<p dir="auto">But you need to have external metric or provider, which will provide values for metrics like RaidControllerInfo(raid1), currently you do not have it.</p>
<p dir="auto">What you currently have is metric "Product Name", which is coming from the provider script and you can create a DCI with that metric (but probably you need to remove space for it to work)</p>
]]></description><link>https://forum.netxms.org/post/34217</link><guid isPermaLink="true">https://forum.netxms.org/post/34217</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Tue, 18 Mar 2025 13:59:24 GMT</pubDate></item></channel></rss>