What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Powershell output

Votes:

0

Your Vote:

Up

Down

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

custom powershell script xml

Created on Sep 17, 2013 7:24:30 PM by  esdlicensing (0) 1

Last change on Sep 19, 2013 5:21:33 AM by  Konstantin Wolff [Paessler Support]



1 Reply

Votes:

0

Your Vote:

Up

Down

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

Created on Sep 19, 2013 5:24:41 AM by  Konstantin Wolff [Paessler Support]



Please log in or register to enter your reply.


Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.