What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

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

HTTP XML/REST Value sensor - Returns Text value



I have a XML/REST Value sensor working fine, unfortunately, the XML return value is a string, not a numeric value. We would like to receive the string, and use a custom lookup to convert translate to the PRTG state.

Something like this, within the lookup .ovl file -

<SingleInt state="OK" value="Up">
  Service is UP

Is there a way to do this with the XML/REST value sensor, or should I use a different sensor?

lookups xml xml-rest-value

Created on Oct 29, 2014 4:06:50 PM

8 Replies



PRTG lookups can only interpret numeric values. We have reversal lookups on our wishlist, but this may take a while. Please bear with us one this one.

In the meantime, you might need a custom PowerShell that does the evalution of the values :)

Created on Oct 31, 2014 4:04:00 PM by  Stephan Linke [Paessler Support]



Ok, thanks. I had a feeling that might be the case.

I have been working on a custom SSH script that pulls the JSON encoded data, parses it, then returns a prtg-readable result. Looks like I'm on the right track.


Created on Oct 31, 2014 7:11:20 PM



Note that we also have a XML/REST available, it also works with JSON:


Maybe you can use this one before you put any work into that script :)

Created on Nov 3, 2014 12:37:31 PM by  Stephan Linke [Paessler Support]

Last change on Nov 3, 2014 12:38:05 PM by  Stephan Linke [Paessler Support]



Hi Stephan.

Yes, that is where I started. But that sensor does not process string (text) values. Only numeric values. Note that I'm looking to process a value of "UP". This is not something the XML/REST sensor can do. At least not yet.

Created on Nov 3, 2014 1:18:31 PM



Hi Paesler Team , was there a way to solve the same problem without the use of additional scripts, add-ons of the sensor, or by changing the custom lookup ?

Created on Oct 2, 2018 1:34:15 PM



Hi there,

You could take a look at the Rest Custom Sensor of PRTG which offers you more options. For example to check if the Value "Up" is found in a specific node you could use:

  "prtg": {
	"text": $.some.node,
    "result": [
        "channel": "Total",
        "value": lookup($.some.node, "Up"),
	"limitmode": 1,
	"LimitMinError": 0,
	"LimitErrorMsg": "The value for 'node' is not 'Up'!"

Best regards.

Created on Oct 3, 2018 7:46:02 AM by  Dariusz Gorka [Paessler Support]



I am completely confused in the sensor REST Custom. I ask you to help. I do not quite have a standard response from the device I want to monitor, when requested "" (GoIP GSM-gateway)

I get such an answer

    <l1_module_status><a href="?type=list&down=1&line=1">Y</a></l1_module_status>
    <l1_module_title>Click to shut down module</l1_module_title>
    <l1_smb_login><font color="#FF0000">N</font></l1_smb_login>
    <l1_sim_remain>NO LIMIT</l1_sim_remain>
    <l1_rct>2018-09-06 04:00:46</l1_rct>
    <l1_sms_count>NO LIMIT</l1_sms_count>
    <l1_call_count>NO LIMIT</l1_call_count>
    <l2_module_status><a href="?type=list&down=1&line=2">Y</a></l2_module_status>
    <l2_module_title>Click to shut down module</l2_module_title>
    <l2_smb_login><font color="#FF0000">N</font></l2_smb_login>
    <l2_sim_remain>NO LIMIT</l2_sim_remain>
    <l2_rct>2018-09-06 04:00:46</l2_rct>
    <l2_sms_count>NO LIMIT</l2_sms_count>
    <l2_call_count>NO LIMIT</l2_call_count>

I need only these lines


The status "Y" is good, the status "N" is an accident, but in the event of an accident the next line comes

    <l1_gsm_sim><font color="#FF0000"></font></l1_gsm_sim>
    <l1_gsm_status><font color="#FF0000">N</font></l1_gsm_status>
    <l1_status_line><font color="#FF0000">N</font></l1_status_line>

It is desirable in one sensor, with the ability to turn on the alarm when the status changes.

Created on Oct 3, 2018 12:22:23 PM

Last change on Oct 3, 2018 6:33:13 PM by  Torsten Lindner [Paessler Support]



Hi there,

Unfortunately, the above "XML"-structure cannot be monitored as is it not an XMl structure. It looks more like HTML mixed with a XML-like structure, which the parser we use is not able to parse because of these lines:

<l1_module_status><a href="?type=list&down=1&line=1">Y</a></l1_module_status>
<l2_module_status><a href="?type=list&down=1&line=2">Y</a></l2_module_status>

And later because of the following within the "<l1_gsm_sim>"-node:

<font color="#FF0000"></font>

Maybe there is another API available that also outputs JSON or a clean XML structure?

Best regards.

Created on Oct 4, 2018 8:31:45 PM by  Dariusz Gorka [Paessler Support]

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.