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
Article Comments
Attention: This article is a record of a conversation with the Paessler support team. The information in this conversation is not updated to preserve the historical record. As a result, some of the information or recommendations in this conversation might be out of date.
Hi,
can you please post the debug output of PRTG for this sensor?
To enable the same, please go to the sensor's tab Settings and set option EXE Result to Write Result to Disk. A file called Result of Sensor XXXX.txt will be created on <PRTG Data Directory>\Logs (Sensors). Please post the output of the same.
Best regards
Sep, 2013 - Permalink