HI,
So I've created an item which grabs the below XML data. Then created another item which is dependent on the original item. Now I would like to store 4 items from the xml data using XML XPATH but having issue with it.
Would like to extract the data for the below.
oampm
tld.sta
fdr.bin lbo and fdr.bin.cnt
And I can't seem to figure out. For i.e, I tried //oampm[@*] as a parameter just to get the interface name but that gives me the complete list of items. Tried other parameters as well. Basically the end result I want to see is the below
for oampm, would like to see the below.
"TWAMProuterSessionVPRN1"
"TWAMProuterSessionVPRN2"
For the first oampm..
for tld.sta, 1605633300
for fdr.bin lbo, 0, 5000, 10000 And for for fdr.bin count 0, 0, 900
Would like to display on zabbix for each interface (oamPM, would display the tld.sta, fdr.bin lbo and fdr.bin.
Can someone help me with this please?
<?xml version='1.0' ?>
<!DOCTYPE stats SYSTEM "stats.dtd">
<stats>
<statsLog>
<time t="1605634831" />
<oampm sna="TWAMProuterSessionVPRN1">
<mi dur="15">
<tld ivl="23031" sta="1605633300" ela="900" ftx="900" frx="900" mdr="72131" xdr="72163" adr="72143" mdf="35998" xdf="36074" adf="36040" mdb="36069" xdb="36161" adb="36102" mvr="0" xvr="152" avr="4" mvf="0" xvf="16" avf="2" mvb="0" xvb="164" avb="3" mrr="424" xrr="456" arr="436" mrf="28" xrf="104" arf="70" mrb="348" xrb="440" arb="381" sus="0">
<fdr>
<bin lbo="0" cnt="0" />
<bin lbo="5000" cnt="0" />
<bin lbo="10000" cnt="900" />
</fdr>
</tld>
</mi>
</oampm>
<oampm sna="TWAMProuterSessionVPRN2">
<mi dur="15">
<tld ivl="23031" sta="1605633300" ela="900" ftx="900" frx="900" mdr="22566" xdr="22634" adr="22575" mdf="11201" xdf="11241" adf="11223" mdb="11337" xdb="11401" adb="11352" mvr="0" xvr="372" avr="5" mvf="0" xvf="172" avf="3" mvb="0" xvb="200" avb="3" mrr="368" xrr="436" arr="377" mrf="192" xrf="232" arf="214" mrb="204" xrb="268" arb="219" sus="0">
<fdr>
<bin lbo="0" cnt="0" />
<bin lbo="5000" cnt="0" />
<bin lbo="10000" cnt="900" />
</fdr>
<fdf>
<bin lbo="0" cnt="0" />
<bin lbo="5000" cnt="0" />
<bin lbo="10000" cnt="900" />
</fdf>
</tld>
</mi>
</oampm>
</statsLog>
</stats>
So I've created an item which grabs the below XML data. Then created another item which is dependent on the original item. Now I would like to store 4 items from the xml data using XML XPATH but having issue with it.
Would like to extract the data for the below.
oampm
tld.sta
fdr.bin lbo and fdr.bin.cnt
And I can't seem to figure out. For i.e, I tried //oampm[@*] as a parameter just to get the interface name but that gives me the complete list of items. Tried other parameters as well. Basically the end result I want to see is the below
for oampm, would like to see the below.
"TWAMProuterSessionVPRN1"
"TWAMProuterSessionVPRN2"
For the first oampm..
for tld.sta, 1605633300
for fdr.bin lbo, 0, 5000, 10000 And for for fdr.bin count 0, 0, 900
Would like to display on zabbix for each interface (oamPM, would display the tld.sta, fdr.bin lbo and fdr.bin.
Can someone help me with this please?
<?xml version='1.0' ?>
<!DOCTYPE stats SYSTEM "stats.dtd">
<stats>
<statsLog>
<time t="1605634831" />
<oampm sna="TWAMProuterSessionVPRN1">
<mi dur="15">
<tld ivl="23031" sta="1605633300" ela="900" ftx="900" frx="900" mdr="72131" xdr="72163" adr="72143" mdf="35998" xdf="36074" adf="36040" mdb="36069" xdb="36161" adb="36102" mvr="0" xvr="152" avr="4" mvf="0" xvf="16" avf="2" mvb="0" xvb="164" avb="3" mrr="424" xrr="456" arr="436" mrf="28" xrf="104" arf="70" mrb="348" xrb="440" arb="381" sus="0">
<fdr>
<bin lbo="0" cnt="0" />
<bin lbo="5000" cnt="0" />
<bin lbo="10000" cnt="900" />
</fdr>
</tld>
</mi>
</oampm>
<oampm sna="TWAMProuterSessionVPRN2">
<mi dur="15">
<tld ivl="23031" sta="1605633300" ela="900" ftx="900" frx="900" mdr="22566" xdr="22634" adr="22575" mdf="11201" xdf="11241" adf="11223" mdb="11337" xdb="11401" adb="11352" mvr="0" xvr="372" avr="5" mvf="0" xvf="172" avf="3" mvb="0" xvb="200" avb="3" mrr="368" xrr="436" arr="377" mrf="192" xrf="232" arf="214" mrb="204" xrb="268" arb="219" sus="0">
<fdr>
<bin lbo="0" cnt="0" />
<bin lbo="5000" cnt="0" />
<bin lbo="10000" cnt="900" />
</fdr>
<fdf>
<bin lbo="0" cnt="0" />
<bin lbo="5000" cnt="0" />
<bin lbo="10000" cnt="900" />
</fdf>
</tld>
</mi>
</oampm>
</statsLog>
</stats>