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 ?
Hi there!
In order to debug this further, we need some additional log files.
Please enable "Write Results to Disk" in the sensor's setting and forward us the logfile after waiting a few minutes. Please find the log in the folder "C:\ProgramData\Paessler\PRTG Network Monitor\Logs (Sensors)" on the probe, the sensor is running on.
Please find the right files by looking for the numerical sensor ID in the filename. You can find the ID in the sensors "Overview" page on the right. Please send us these files to support@paessler.com, referring to the ticket "PAE1072524"
Thank you!
Andreas Günther
Tech Support, Paessler AG
Aug, 2018 - Permalink