[SOLVED] Need Help Creating Custom Data Query

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

Moderators: Developers, Moderators

Post Reply
cdoyle1
Posts: 2
Joined: Mon Aug 29, 2016 12:19 pm

[SOLVED] Need Help Creating Custom Data Query

Post by cdoyle1 »

I'm trying to create a custom data query for a couple of OIDs that use a different index than the standard ifIndex. Below is my XML file and the output of running a verbose query. I don't get why it stops at the "Executing SNMP walk for data @..." line and doesn't continue to actually do the walk for the index and then the two output OIDs. It returns 0 items and 0 rows. Any help would be hugely appreciated.

Code: Select all

<query>
        <name>Get Ciena CESD Optical Power</name>
        <description>Queries a host for a list of monitorable interfaces</description>
        <oid_index>1.3.6.1.4.1.6141.2.60.4.1.1.1.1.1</oid_index>
        <index_order_type>numeric</index_order_type>

        <fields>
                <wwpLeosPortXcvrId>
                        <name>Index</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>1.3.6.1.4.1.6141.2.60.4.1.1.1.1.1</oid>
                </wwpLeosPortXcvrId>
                <rxPower>
                        <name>Optical Receive Power</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>1.3.6.1.4.1.6141.2.60.4.1.1.1.1.106</oid>
                </rxPower>
                <txPower>
                        <name>Optical Transmit Power</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>1.3.6.1.4.1.6141.2.60.4.1.1.1.1.105</oid>
                </txPower>
        </fields>
</query>

Code: Select all

+ Running data query [11].
+ Found type = '3' [SNMP Query].
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/CESD_Optical_Power.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.6141.2.60.4.1.1.1.1.1' Index Count: 6
+ Index found at OID: 'enterprises.6141.2.60.4.1.1.1.1.1.1' value: '1'
+ Index found at OID: 'enterprises.6141.2.60.4.1.1.1.1.1.2' value: '2'
+ Index found at OID: 'enterprises.6141.2.60.4.1.1.1.1.1.3' value: '3'
+ Index found at OID: 'enterprises.6141.2.60.4.1.1.1.1.1.4' value: '4'
+ Index found at OID: 'enterprises.6141.2.60.4.1.1.1.1.1.5' value: '5'
+ Index found at OID: 'enterprises.6141.2.60.4.1.1.1.1.1.6' value: '6'
+ Located input field 'wwpLeosPortXcvrId' [walk]
+ Executing SNMP walk for data @ '1.3.6.1.4.1.6141.2.60.4.1.1.1.1.1'
Last edited by cdoyle1 on Thu Sep 01, 2016 10:25 am, edited 1 time in total.
cdoyle1
Posts: 2
Joined: Mon Aug 29, 2016 12:19 pm

Re: Need Help Creating Custom Data Query

Post by cdoyle1 »

I figured out what was wrong. The device was timing out when trying to run the query using the default timeout of 500 ms. I bumped the timeout up to 1000 ms and that resolved the issue. I'm not sure why the device needs a longer timeout for this query and not the standard SNMP interface query though as there are far fewer OIDs in this query and I have no issues running the snmpwalk from the command line.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests