For reference, this is an multi-channel example XML response supported by the HTTP Data Advanced sensor:
<?xml version="1.0" encoding="utf-8" ?>
<prtg>
<result>
<channel>Channel 1 (float)</channel>
<value>12.3456</value>
<float>1</float>
<unit>custom</unit>
<customunit>celsius</customunit>
</result>
<result>
<channel>Channel 2 (integer)</channel>
<value>42</value>
<limitmode>1</limitmode>
<limitmaxwarning>50</limitmaxwarning>
<limitmaxerror>60</limitmaxerror>
</result>
<result>
<channel>Channel 3 (lookup)</channel>
<value>1</value>
<valuelookup>prtg.standardlookups.exchangedag.yesno.stateyesok</valuelookup>
</result>
<result>
<channel>Channel 4 (delta)</channel>
<value>123456</value>
<mode>difference</mode>
<unit>bytesbandwidth</unit>
</result>
<text>The sensor's message</text>
</prtg>
And the same response in JSON for reference:
{
"prtg": {
"result": [
{
"channel": "Channel 1 (float)",
"value": "12.3456",
"float": "1",
"unit": "custom",
"customunit": "celsius"
},
{
"channel": "Channel 2 (integer)",
"value": "42",
"limitmode": "1",
"limitmaxwarning": "50",
"limitmaxerror": "60"
},
{
"channel": "Channel 3 (lookup)",
"value": "1",
"valuelookup": "prtg.standardlookups.exchangedag.yesno.stateyesok"
},
{
"channel": "Channel 4 (delta)",
"value": "123456",
"mode": "difference",
"unit": "bytesbandwidth"
}
],
"text": "The sensor's message"
}
}
There are several online XML<->JSON converter tools, for instance:
http://www.utilities-online.info/xmltojson/
Best Regards,
Luciano Lingnau [Paessler Support]
Add comment