Here's my script:
$state = get-wmiobject MSCluster_Node -computername sqlserver1 -namespace ROOT\mscluster -authentication packetprivacy | Where { $_.nodeinstanceid -match "00000000-0000-0000-0000-000000000001" } | foreach { $_.state}
write-host "<prtg>" "<result>" "<channel>State</channel>" "<value>$state</value>" "</result>" "</prtg>" Exit 0
when I run the script on the probe the output is as follows:
<prtg> <result> <channel>State</channel> <value>0</value> </result> </prtg>
However, the sensor fails with the error below:
Error reading response: Invalid XML (missing /prtg)
No Channels Received
Add comment