Hello everyone,
I am quite stuck on this one,
I made a PowerShell script that parse a table from a web page to an array in order to render the result on PRTG.
The end of the script is as follow :
$value = $MyArray['value:'] $valueint = [int]$value write-host "<prtg>" "<result>" "<channel>Number of Value</channel>" "<value>$valueint</value>" # "<warning>1</warning>" "</result>" # "<text>The number of Value on the Web Page is $valueint</text>" "</prtg>"
When I create the sensor, the channel gets created but the value is 0
The warning and text are working, but it’s written “..Web Page is 0”.
The executionpolicy is set as unrestricted on the server where the remote probe is running.
When I run the script on the server, I get the actual value.
The credentials for the device in PRTG are from the same domain admin that I use to do the test on the server.
I have seen that if the variable is not an integer, PRTG will just get 0 as a result but I think that it's not the case here
What am I missing ?
Add comment