New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

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

 

Top Tags


View all Tags


How can I use XPath with the XML/Rest Value Sensor?

Votes:

0

Your Vote:

Up

Down

I would like to have more information about XPath usage when querying XML files.

help prtg xml xml-rest xpath

Created on Oct 13, 2011 1:27:08 PM by  Daniel Zobel [Paessler Support]

Last change on Apr 24, 2019 9:59:16 AM by  Maike Behnsen [Paessler Support]



1 Reply

Accepted Answer

Votes:

0

Your Vote:

Up

Down

CAUTION

The syntax provided in this article is not fully compatible with the HTTP XML/REST Value sensor. This sensor type does not officially support the use of XPath and we cannot give you any technical support regarding XPath issues.

This article is provided for your information only.


XPath

In the XML Node (and optional property) setting of the HTTP XML/REST Value sensor, you can try to use XPath, which can enable you to read, for example, values of arrays from XML files. For example, use array[@name='myName'] to read all 'array' elements that have a 'name' attribute equal to 'myName'. A few more examples:

Get all sensors with a certain status: //status[text()='green']
Get all HTTP-based sensors from the PRTG configuration file (using PowerShell): sensor[@id][data/sensorkind[normalize-space(text())="http"]]

Links

Created on Oct 13, 2011 1:30:27 PM by  Daniel Zobel [Paessler Support]

Last change on May 10, 2019 12:02:17 PM by  Maike Behnsen [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.