Hi. I try to get values of array from this XML using PRTG's HTTP XML/REST Value Sensor:

<entry channel="1" enabled="1" present="1">
<item t="text" r="1" d="Channel type">FXO</item>
<item t="text" r="1" d="Line status">Ready</item>
<item t="text" r="1" d="CO Line">Connected</item>
<item t="text" r="1" d="Reg. status">Registered</item>
<item t="int" r="0" d="SIP port">5061</item>
<item t="text" r="0" d="Call type"/>
<item t="text" r="1" d="Status">Idle</item>
<item t="int" r="0" d="Call limit">0</item>
<item t="int" r="0" d="Total duration">0</item>
<item t="text" r="0" d="Memo"/>
</entry>

with the following XML Node field:

entry[@channel='1']/item[@d] 
and I want to get all 'item' ellement in different channels, e.g.:
Channel type = FXO
Line status = Line status....

but now I get in this form:

Value = 0
Message = Node entry[@channel='1']/item[@d] holds value FXO.

Channels:
Downtime		
Execution Time	
Value

Article Comments

Hello,

Thank you very much for using PRTG. Please bear in mind, the HTTP XML / REST Sensor can only gather one value in the value channel. Multiple channels are not possible.

best regards.


Apr, 2015 - Permalink

I wrote a program to convert the kind of CML at the right for "XML Custom EXE / Script sensor" in this form:

<result>
    <channel>CO Line</channel>
    <unit>Custom</unit>
    <CustomUnit>CO Line</CustomUnit>
    <Warning>0</Warning>
    <LimitMaxError>4</LimitMaxError>
    <LimitErrorMsg>Not ready</LimitErrorMsg>
    <ValueLookup>prtg.standardlookups.KTS_Status</ValueLookup>
    <value>4</value>
</result>
<result>
    <channel>Reg. status</channel>
    <unit>Custom</unit>
    <CustomUnit>Reg. status</CustomUnit>
    <Warning>0</Warning>
    <LimitMaxError>4</LimitMaxError>
    <LimitErrorMsg>Not ready</LimitErrorMsg>
    <ValueLookup>prtg.standardlookups.KTS_Status</ValueLookup>
    <value>4</value>
</result>
....

Apr, 2015 - Permalink

That of course is a very good solution. Glad you could solve this!


Apr, 2015 - Permalink