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.
300.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

How do I select a value from xml to use for a HTTP XML/REST Value sensor?

Votes:

0

Your Vote:

Up

Down

I'm trying to extract the value of Queued in the xml below using the HTTP XML/REST Value sensor:

<xxxxresponse>
  <action>GETSTATISTICS</action>
  <response>Success</response>
  <responsedata xmlns:xxxx="http://schemas.xxxxxxxxxx.com/aci/">
    <xxxx:stat class="Indexer" xxxxid="Queue" name="Received" metric="6" value="1665522"/>
    <xxxx:stat class="Indexer" xxxxid="Queue" name="Completed" metric="6" value="1665520"/>
    <xxxx:stat class="Indexer" xxxxid="Queue" name="Queued" metric="6" value="2"/>
  </responsedata>
</xxxxresponse>

I've tried many variations of the following:

  • xxxx:stat[@name='Queued']
  • stat[@name='Queued'] - doesnt seem to work (with 'Remove namespaces')
  • /stat[@Queued]

Am I using the correct sensor? If so, what is the correct syntax to pull out the value?

Thanks.

http-xml-rest sensor xml-rest

Created on Aug 19, 2020 11:28:48 AM by  madaw (60) 1 1



1 Reply

Votes:

0

Your Vote:

Up

Down

Hello,

Please have a look at the following articles, where this is explained:
- How do I extract values from XML nodes
- HTTP XML/REST Value Sensor

If you cannot solve it, please open a support ticket at [email protected] and send us screenshots of the sensor settings, so we can take a closer look.

Kind Regards,
Timo Dambach
Paessler Tech Support

Created on Aug 20, 2020 7:37:10 AM by  Timo Dambach [Paessler Support]

Last change on Aug 20, 2020 7:37:20 AM by  Timo Dambach [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.