I am trying to make a custom advanced sensor to monitor MS Exchange status, however, the xml seems cannot be regonized by PRTG server.
I created 2 testing scripts, both of them got valid output on Windows Powershell. But PRTG server could not regonize the script 1 with error messgae
"Error reading response: Invalid XML (XML Parser mismatch: Wanted </<<<>, got </prtg>)"
Here is my testing ps scripts
1) With Exchange powershell imported
$session = new-pssession -ConfigurationName "Microsoft.Exchange" -ConnectionUri "http://TESTEXCH01/Powershell" -Authentication Kerberos import-pssession -Session $session -AllowClobber -DisableNameChecking | out-null Write-Host "<prtg>" Write-Host "<result>" Write-Host "<channel>Test Channel</channel>" Write-Host "<value>0</value>" Write-Host "</result>" Write-Host "</prtg>" remove-pssession -Session $session
2) Without Exchange powershell imported
Write-Host "<prtg>" Write-Host "<result>" Write-Host "<channel>Test Channel</channel>" Write-Host "<value>0</value>" Write-Host "</result>" Write-Host "</prtg>"
Can anymore help please?
Add comment