[solved] Problem with Data Query Index

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
momorientes
Posts: 2
Joined: Fri Jul 17, 2015 2:21 am

[solved] Problem with Data Query Index

Post by momorientes »

Hi,

I'm polling a host using the dataquery at the bottom.
The device offers a ifIndex mib which i set as oid_index, sadly cacti seems to guess the ifindex on its own and therefore keeps overwriting the first 4 entries.
What am I doing wrong? Thanks in advance
Here's the verbose query:

Code: Select all

+ Running data query [17].
+ Found type = '3' [SNMP Query].
+ Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/cmmc_ports.xml'
+ XML file parsed ok.
+ <oid_num_indexes> missing in XML file, 'Index Count Changed' emulated by counting oid_index entries
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.629.200.8.1.1.43' Index Count: 28
+ Index found at OID: 'iso.3.6.1.4.1.629.200.8.1.1.43.1.10.1' value: '110001'
+ Index found at OID: 'iso.3.6.1.4.1.629.200.8.1.1.43.1.10.2' value: '110002'
+ Index found at OID: 'iso.3.6.1.4.1.629.200.8.1.1.43.1.10.3' value: '110003'
+ Index found at OID: 'iso.3.6.1.4.1.629.200.8.1.1.43.1.10.4' value: '110004'
+ Index found at OID: 'iso.3.6.1.4.1.629.200.8.1.1.43.1.11.1' value: '111001'
+ Index found at OID: 'iso.3.6.1.4.1.629.200.8.1.1.43.1.11.2' value: '111002'
+ Index found at OID: 'iso.3.6.1.4.1.629.200.8.1.1.43.1.11.3' value: '111003'
+ Index found at OID: 'iso.3.6.1.4.1.629.200.8.1.1.43.1.11.4' value: '111004'
+ Index found at OID: 'iso.3.6.1.4.1.629.200.8.1.1.43.1.12.1' value: '112001'
+ Index found at OID: 'iso.3.6.1.4.1.629.200.8.1.1.43.1.12.2' value: '112002'
+ Index found at OID: 'iso.3.6.1.4.1.629.200.8.1.1.43.1.12.3' value: '112003'
+ Index found at OID: 'iso.3.6.1.4.1.629.200.8.1.1.43.1.12.4' value: '112004'
+ Index found at OID: 'iso.3.6.1.4.1.629.200.8.1.1.43.1.13.1' value: '113001'
+ Index found at OID: 'iso.3.6.1.4.1.629.200.8.1.1.43.1.13.2' value: '113002'
+ Index found at OID: 'iso.3.6.1.4.1.629.200.8.1.1.43.1.13.3' value: '113003'
+ Index found at OID: 'iso.3.6.1.4.1.629.200.8.1.1.43.1.13.4' value: '113004'
+ Index found at OID: 'iso.3.6.1.4.1.629.200.8.1.1.43.1.14.1' value: '114001'
+ Index found at OID: 'iso.3.6.1.4.1.629.200.8.1.1.43.1.14.2' value: '114002'
+ Index found at OID: 'iso.3.6.1.4.1.629.200.8.1.1.43.1.14.3' value: '114003'
+ Index found at OID: 'iso.3.6.1.4.1.629.200.8.1.1.43.1.14.4' value: '114004'
+ Index found at OID: 'iso.3.6.1.4.1.629.200.8.1.1.43.1.15.1' value: '115001'
+ Index found at OID: 'iso.3.6.1.4.1.629.200.8.1.1.43.1.15.2' value: '115002'
+ Index found at OID: 'iso.3.6.1.4.1.629.200.8.1.1.43.1.15.3' value: '115003'
+ Index found at OID: 'iso.3.6.1.4.1.629.200.8.1.1.43.1.15.4' value: '115004'
+ Index found at OID: 'iso.3.6.1.4.1.629.200.8.1.1.43.1.16.1' value: '116001'
+ Index found at OID: 'iso.3.6.1.4.1.629.200.8.1.1.43.1.16.2' value: '116002'
+ Index found at OID: 'iso.3.6.1.4.1.629.200.8.1.1.43.1.16.3' value: '116003'
+ Index found at OID: 'iso.3.6.1.4.1.629.200.8.1.1.43.1.16.4' value: '116004'
+ Located input field 'ifIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.629.200.8.1.1.43'
+ Found item [ifIndex='110001'] index: 1 [from value]
+ Found item [ifIndex='110002'] index: 2 [from value]
+ Found item [ifIndex='110003'] index: 3 [from value]
+ Found item [ifIndex='110004'] index: 4 [from value]
+ Found item [ifIndex='111001'] index: 1 [from value]
+ Found item [ifIndex='111002'] index: 2 [from value]
+ Found item [ifIndex='111003'] index: 3 [from value]
+ Found item [ifIndex='111004'] index: 4 [from value]
+ Found item [ifIndex='112001'] index: 1 [from value]
+ Found item [ifIndex='112002'] index: 2 [from value]
+ Found item [ifIndex='112003'] index: 3 [from value]
+ Found item [ifIndex='112004'] index: 4 [from value]
+ Found item [ifIndex='113001'] index: 1 [from value]
+ Found item [ifIndex='113002'] index: 2 [from value]
+ Found item [ifIndex='113003'] index: 3 [from value]
+ Found item [ifIndex='113004'] index: 4 [from value]
+ Found item [ifIndex='114001'] index: 1 [from value]
+ Found item [ifIndex='114002'] index: 2 [from value]
+ Found item [ifIndex='114003'] index: 3 [from value]
+ Found item [ifIndex='114004'] index: 4 [from value]
+ Found item [ifIndex='115001'] index: 1 [from value]
+ Found item [ifIndex='115002'] index: 2 [from value]
+ Found item [ifIndex='115003'] index: 3 [from value]
+ Found item [ifIndex='115004'] index: 4 [from value]
+ Found item [ifIndex='116001'] index: 1 [from value]
+ Found item [ifIndex='116002'] index: 2 [from value]
+ Found item [ifIndex='116003'] index: 3 [from value]
+ Found item [ifIndex='116004'] index: 4 [from value]
+ Located input field 'portTemp' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.629.200.8.1.1.30'
+ Found item [portTemp='22'] index: 1 [from value]
+ Found item [portTemp='12'] index: 2 [from value]
+ Found item [portTemp='22'] index: 3 [from value]
+ Found item [portTemp='20'] index: 4 [from value]
+ Found item [portTemp='30'] index: 1 [from value]
+ Found item [portTemp='16'] index: 2 [from value]
+ Found item [portTemp='36'] index: 3 [from value]
+ Found item [portTemp='20'] index: 4 [from value]
+ Found item [portTemp='35'] index: 1 [from value]
+ Found item [portTemp='22'] index: 2 [from value]
+ Found item [portTemp='37'] index: 3 [from value]
+ Found item [portTemp='23'] index: 4 [from value]
+ Found item [portTemp='35'] index: 1 [from value]
+ Found item [portTemp='18'] index: 2 [from value]
+ Found item [portTemp='37'] index: 3 [from value]
+ Found item [portTemp='23'] index: 4 [from value]
+ Found item [portTemp='36'] index: 1 [from value]
+ Found item [portTemp='22'] index: 2 [from value]
+ Found item [portTemp='36'] index: 3 [from value]
+ Found item [portTemp='20'] index: 4 [from value]
+ Found item [portTemp='34'] index: 1 [from value]
+ Found item [portTemp='22'] index: 2 [from value]
+ Found item [portTemp='37'] index: 3 [from value]
+ Found item [portTemp='20'] index: 4 [from value]
+ Found item [portTemp='-2147483648'] index: 1 [from value]
+ Found item [portTemp='33'] index: 2 [from value]
+ Found item [portTemp='18'] index: 3 [from value]
+ Found item [portTemp='-2147483648'] index: 4 [from value]
+ Located input field 'portTxPower' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.629.200.8.1.1.31'
+ Found item [portTxPower='-6746'] index: 1 [from value]
+ Found item [portTxPower='-2147483647'] index: 2 [from value]
+ Found item [portTxPower='-6955'] index: 3 [from value]
+ Found item [portTxPower='571'] index: 4 [from value]
+ Found item [portTxPower='-4374'] index: 1 [from value]
+ Found item [portTxPower='-2147483647'] index: 2 [from value]
+ Found item [portTxPower='-5301'] index: 3 [from value]
+ Found item [portTxPower='150'] index: 4 [from value]
+ Found item [portTxPower='-2980'] index: 1 [from value]
+ Found item [portTxPower='255'] index: 2 [from value]
+ Found item [portTxPower='-1830'] index: 3 [from value]
+ Found item [portTxPower='74'] index: 4 [from value]
+ Found item [portTxPower='-3142'] index: 1 [from value]
+ Found item [portTxPower='230'] index: 2 [from value]
+ Found item [portTxPower='-1591'] index: 3 [from value]
+ Found item [portTxPower='124'] index: 4 [from value]
+ Found item [portTxPower='-3416'] index: 1 [from value]
+ Found item [portTxPower='-29'] index: 2 [from value]
+ Found item [portTxPower='-3910'] index: 3 [from value]
+ Found item [portTxPower='199'] index: 4 [from value]
+ Found item [portTxPower='-2341'] index: 1 [from value]
+ Found item [portTxPower='119'] index: 2 [from value]
+ Found item [portTxPower='-1892'] index: 3 [from value]
+ Found item [portTxPower='229'] index: 4 [from value]
+ Found item [portTxPower='-2147483648'] index: 1 [from value]
+ Found item [portTxPower='-5654'] index: 2 [from value]
+ Found item [portTxPower='635'] index: 3 [from value]
+ Found item [portTxPower='-2147483648'] index: 4 [from value]
+ Located input field 'portRxPower' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.629.200.8.1.1.32'
+ Found item [portRxPower='-2147483647'] index: 1 [from value]
+ Found item [portRxPower='-2147483647'] index: 2 [from value]
+ Found item [portRxPower='-5318'] index: 3 [from value]
+ Found item [portRxPower='-12781'] index: 4 [from value]
+ Found item [portRxPower='-2147483647'] index: 1 [from value]
+ Found item [portRxPower='-2147483647'] index: 2 [from value]
+ Found item [portRxPower='-2623'] index: 3 [from value]
+ Found item [portRxPower='-11542'] index: 4 [from value]
+ Found item [portRxPower='-5782'] index: 1 [from value]
+ Found item [portRxPower='-11123'] index: 2 [from value]
+ Found item [portRxPower='-9125'] index: 3 [from value]
+ Found item [portRxPower='-13914'] index: 4 [from value]
+ Found item [portRxPower='-3422'] index: 1 [from value]
+ Found item [portRxPower='-11924'] index: 2 [from value]
+ Found item [portRxPower='-2677'] index: 3 [from value]
+ Found item [portRxPower='-11450'] index: 4 [from value]
+ Found item [portRxPower='-3047'] index: 1 [from value]
+ Found item [portRxPower='-11890'] index: 2 [from value]
+ Found item [portRxPower='-3735'] index: 3 [from value]
+ Found item [portRxPower='-11481'] index: 4 [from value]
+ Found item [portRxPower='-3027'] index: 1 [from value]
+ Found item [portRxPower='-11290'] index: 2 [from value]
+ Found item [portRxPower='-3238'] index: 3 [from value]
+ Found item [portRxPower='-11844'] index: 4 [from value]
+ Found item [portRxPower='-2147483648'] index: 1 [from value]
+ Found item [portRxPower='-9385'] index: 2 [from value]
+ Found item [portRxPower='-13133'] index: 3 [from value]
+ Found item [portRxPower='-2147483648'] index: 4 [from value]
+ Located input field 'portBias' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.629.200.8.1.1.33'
+ Found item [portBias='7927'] index: 1 [from value]
+ Found item [portBias='0'] index: 2 [from value]
+ Found item [portBias='7872'] index: 3 [from value]
+ Found item [portBias='29947'] index: 4 [from value]
+ Found item [portBias='8199'] index: 1 [from value]
+ Found item [portBias='0'] index: 2 [from value]
+ Found item [portBias='8428'] index: 3 [from value]
+ Found item [portBias='29996'] index: 4 [from value]
+ Found item [portBias='8208'] index: 1 [from value]
+ Found item [portBias='29694'] index: 2 [from value]
+ Found item [portBias='8168'] index: 3 [from value]
+ Found item [portBias='29829'] index: 4 [from value]
+ Found item [portBias='8168'] index: 1 [from value]
+ Found item [portBias='29906'] index: 2 [from value]
+ Found item [portBias='8171'] index: 3 [from value]
+ Found item [portBias='29753'] index: 4 [from value]
+ Found item [portBias='8380'] index: 1 [from value]
+ Found item [portBias='29826'] index: 2 [from value]
+ Found item [portBias='7943'] index: 3 [from value]
+ Found item [portBias='29941'] index: 4 [from value]
+ Found item [portBias='8112'] index: 1 [from value]
+ Found item [portBias='30315'] index: 2 [from value]
+ Found item [portBias='8144'] index: 3 [from value]
+ Found item [portBias='29997'] index: 4 [from value]
+ Found item [portBias='-1'] index: 1 [from value]
+ Found item [portBias='10031'] index: 2 [from value]
+ Found item [portBias='29767'] index: 3 [from value]
+ Found item [portBias='-1'] index: 4 [from value]
+ Located input field 'portSupplyVoltage' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.629.200.8.1.1.34'
+ Found item [portSupplyVoltage='3300'] index: 1 [from value]
+ Found item [portSupplyVoltage='3234'] index: 2 [from value]
+ Found item [portSupplyVoltage='3292'] index: 3 [from value]
+ Found item [portSupplyVoltage='3227'] index: 4 [from value]
+ Found item [portSupplyVoltage='3388'] index: 1 [from value]
+ Found item [portSupplyVoltage='3221'] index: 2 [from value]
+ Found item [portSupplyVoltage='3309'] index: 3 [from value]
+ Found item [portSupplyVoltage='3217'] index: 4 [from value]
+ Found item [portSupplyVoltage='3364'] index: 1 [from value]
+ Found item [portSupplyVoltage='3220'] index: 2 [from value]
+ Found item [portSupplyVoltage='3332'] index: 3 [from value]
+ Found item [portSupplyVoltage='3220'] index: 4 [from value]
+ Found item [portSupplyVoltage='3404'] index: 1 [from value]
+ Found item [portSupplyVoltage='3230'] index: 2 [from value]
+ Found item [portSupplyVoltage='3366'] index: 3 [from value]
+ Found item [portSupplyVoltage='3232'] index: 4 [from value]
+ Found item [portSupplyVoltage='3364'] index: 1 [from value]
+ Found item [portSupplyVoltage='3220'] index: 2 [from value]
+ Found item [portSupplyVoltage='3338'] index: 3 [from value]
+ Found item [portSupplyVoltage='3220'] index: 4 [from value]
+ Found item [portSupplyVoltage='3387'] index: 1 [from value]
+ Found item [portSupplyVoltage='3244'] index: 2 [from value]
+ Found item [portSupplyVoltage='3362'] index: 3 [from value]
+ Found item [portSupplyVoltage='3243'] index: 4 [from value]
+ Found item [portSupplyVoltage='-1'] index: 1 [from value]
+ Found item [portSupplyVoltage='3318'] index: 2 [from value]
+ Found item [portSupplyVoltage='3282'] index: 3 [from value]
+ Found item [portSupplyVoltage='-1'] index: 4 [from value]
+ Located input field 'portWavelength' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.629.200.8.1.1.52'
+ Found item [portWavelength='850'] index: 1 [from value]
+ Found item [portWavelength='1560.610'] index: 2 [from value]
+ Found item [portWavelength='850'] index: 3 [from value]
+ Found item [portWavelength='1559.790'] index: 4 [from value]
+ Found item [portWavelength='850'] index: 1 [from value]
+ Found item [portWavelength='1556.550'] index: 2 [from value]
+ Found item [portWavelength='850'] index: 3 [from value]
+ Found item [portWavelength='1555.750'] index: 4 [from value]
+ Found item [portWavelength='850'] index: 1 [from value]
+ Found item [portWavelength='1554.940'] index: 2 [from value]
+ Found item [portWavelength='850'] index: 3 [from value]
+ Found item [portWavelength='1554.130'] index: 4 [from value]
+ Found item [portWavelength='850'] index: 1 [from value]
+ Found item [portWavelength='1553.330'] index: 2 [from value]
+ Found item [portWavelength='850'] index: 3 [from value]
+ Found item [portWavelength='1552.520'] index: 4 [from value]
+ Found item [portWavelength='850'] index: 1 [from value]
+ Found item [portWavelength='1551.720'] index: 2 [from value]
+ Found item [portWavelength='850'] index: 3 [from value]
+ Found item [portWavelength='1550.920'] index: 4 [from value]
+ Found item [portWavelength='850'] index: 1 [from value]
+ Found item [portWavelength='1550.120'] index: 2 [from value]
+ Found item [portWavelength='850'] index: 3 [from value]
+ Found item [portWavelength='1549.320'] index: 4 [from value]
+ Found item [portWavelength='N/A'] index: 1 [from value]
+ Found item [portWavelength='1310'] index: 2 [from value]
+ Found item [portWavelength='1559.790'] index: 3 [from value]
+ Found item [portWavelength='N/A'] index: 4 [from value]

Code: Select all

<interface>
        <name>Get MRV SNMP Interfaces</name>
        <description>Queries an MRV OptiDrivers nbsCmmCPort mib </description>
        <oid_index>.1.3.6.1.4.1.629.200.8.1.1.43</oid_index>
	<index_order_type>numeric</index_order_type>

        <fields>
	    <ifIndex>
	    	<name>Index</name>
		<method>walk</method>
		<source>value</source>
		<direction>input</direction>
		<oid>.1.3.6.1.4.1.629.200.8.1.1.43</oid>
	    </ifIndex>

            <portTemp>
                <name>Temperature</name>
                <method>walk</method>
                <source>value</source>
                <direction>input</direction>
                <oid>.1.3.6.1.4.1.629.200.8.1.1.30</oid>
            </portTemp>

            <portTxPower>
                <name>TXPower</name>
                <method>walk</method>
                <source>value</source>
                <direction>input</direction>
                <oid>.1.3.6.1.4.1.629.200.8.1.1.31</oid>
            </portTxPower>

            <portRxPower>
                <name>RXPower</name>
                <method>walk</method>
                <source>value</source>
                <direction>input</direction>
                <oid>.1.3.6.1.4.1.629.200.8.1.1.32</oid>
            </portRxPower>

            <portBias>
                <name>Bias</name>
                <method>walk</method>
                <source>value</source>
                <direction>input</direction>
                <oid>.1.3.6.1.4.1.629.200.8.1.1.33</oid>
            </portBias>

            <portSupplyVoltage>
                <name>SupplyVoltage</name>
                <method>walk</method>
                <source>value</source>
                <direction>input</direction>
                <oid>.1.3.6.1.4.1.629.200.8.1.1.34</oid>
            </portSupplyVoltage>

            <portWavelength>
                <name>PortWavelength</name>
                <method>walk</method>
                <source>value</source>
                <direction>input</direction>
                <oid>.1.3.6.1.4.1.629.200.8.1.1.52</oid>
            </portWavelength>
    </fields>
</interface>
Last edited by momorientes on Fri Jul 17, 2015 5:59 am, edited 1 time in total.
momorientes
Posts: 2
Joined: Fri Jul 17, 2015 2:21 am

Re: Problem with Data Query Index

Post by momorientes »

solved it using:

Code: Select all

        <oid_index_parse>OID/REGEXP:.*\.([0-9]{1,3}\.[0-9]{1,3})$</oid_index_parse> 
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest