Hi, I have a problem. I'm trying to get results from XML file and display them in PRTG as one sensor with multiple channels. My XML file have following format:
<?xml version="1.0" encoding="UTF-8" standalone="true"?> -<RESPONSE VERSION="L100"> <COMP P="1" G="0"/> -<OBJECT format="rows" oid="1" name="controller-statistics" basetype="controller-statistics"> <PROPERTY name="durable-id" type="string">controller_1</PROPERTY> <PROPERTY name="cpu-load" type="uint32">6</PROPERTY> <PROPERTY name="write-cache-used" type="uint32">25</PROPERTY> <PROPERTY name="bytes-per-second" type="string" units="MB">35.2MB</PROPERTY> <PROPERTY name="iops" type="uint32">346</PROPERTY> </OBJECT>
<COMP P="2" G="0"/> -<OBJECT format="rows" oid="2" name="controller-statistics" basetype="controller-statistics"> <PROPERTY name="durable-id" type="string">controller_B</PROPERTY> <PROPERTY name="cpu-load" type="uint32">6</PROPERTY> <PROPERTY name="power-on-time" type="uint32">7981121</PROPERTY> <PROPERTY name="write-cache-used" type="uint32">24</PROPERTY> <PROPERTY name="bytes-per-second" type="string" units="KB">3687.4KB</PROPERTY> <PROPERTY name="iops" type="uint32">171</PROPERTY> </OBJECT>
<COMP P="3" G="0"/> -<OBJECT oid="3" name="status" basetype="status"> <PROPERTY name="response-type" type="string">Success</PROPERTY> <PROPERTY name="return-code" type="sint32">0</PROPERTY> <PROPERTY name="component-id" type="string"/> <PROPERTY name="time-stamp" type="string">2013-09-05 23:47:06</PROPERTY> </OBJECT> </RESPONSE>
I would like to create 3 sensors: 1st: will collect durable-id, cpu-load, write-cache-used, bytes-per-second, iops from Object OID1 2nd: will collect durable-id, cpu-load, write-cache-used, bytes-per-second, iops from Object OID1 3rd: will collect response-type from Object OID3
XML file is dynamic and its replaced every 60 sec and values on those PROPERTIES are changing.
I found some articles but so far I was unable to figure this out. As I'm pretty busy on daily basis I don't have time to spend much more time on this.
Can someone please help me?
Regards, Pawel
Add comment