Hello there
We've created a small powershell script for retreiving a CSV file from M$ SNDS, and entering the data into PRTG.
'''
$url = "https://xxx"
$headers = 'channel','DateFrom','DateTo','rcpt','data','receipients','status','compliantrate','trapperiod','samplehelo','samplemailfrom'
$innerbox = @{
"result" = Invoke-WebRequest $url | Select-Object -ExpandProperty Content | ConvertFrom-Csv -Header $headers
}
@{"prtg" = $innerbox}|ConvertTo-Json -Compress -Depth 100
'''
The result looks correct to my eyes:
'''
{"prtg":{"result":[{"channel":"1.2.3.48","DateFrom":"1/13/2020 1:00 AM","DateTo":"1/13/2020 11:00 PM","rcpt":"2883","data":"2883","rece
ipients":"2860","status":"GREEN","compliantrate":"\u003c 0.1%","trapperiod":"","samplehelo":"","samplemailfrom":"0"}]}}
'''
But in PRTG I get the message:
XML: The returned XML does not match the expected schema. (code: PE233) -- JSON: The returned JSON does not match the expected structure (Result is missing). (code: PE231)
Hi there,
Please enable the Write sensor result to disk (Filename: "Result of Sensor [ID].txt") and forward the resulting text files to support@paessler.com. They are located on the probe host in the directory C:\ProgramData\Paessler\PRTG Network Monitor\Logs (Sensors).
Kind regards,
Felix Saure, Tech Support Team
Jan, 2020 - Permalink