Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - IcebreakerKrasin

#1
Good day! 
I added an External List and an ExternalMetricProvider to the agent configuration file.:

ExternalList = RaidController: powershell.exe -NoLogo -STA -NoProfile
-NonInteractive -File "C:\Backup\StartRI.ps1" -List

ExternalMetricProvider = powershell.exe -NoLogo -STA -NoProfile
-NonInteractive -File "C:\Backup\StartRI.ps1":600

Test script for getting controller parameters:

$PSCommandPath = "C:\Backup\C_Model.ps1"
Start-Process powershell -ArgumentList '-NoProfile -NonInteractive -ExecutionPolicy Bypass -File "C:\Backup\C_Model.ps1'
-Verb RunAs

$prefix = 'Product Name'
$ExecuteStoreCLI = Get-Content -Path 'C:\Backup\Storcli\Windows\RaidInfo.txt' -Raw
$ArrayStorCli = ConvertFrom-Json  $ExecuteStoreCLI
$reportLine = ([String]::Format("{0} ={1}",
            $prefix,
            $ArrayStorCli.Controllers.'Response data'.'Product Name'       
))
Write-Output  $reportLine

The script returns a string like:
Product Name = AVAGO MegaRAID SAS 9440-8i


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?

Metrica Settings: