XML Data Query for Ciena

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
DraGun
Posts: 44
Joined: Thu May 24, 2012 11:21 am

XML Data Query for Ciena

Post by DraGun »

Hi,

I'm trying to build a SNMP Data query with a XML file.

Here is the XML:

Code: Select all

<interface>
        <name>Get SNMP Interfaces</name>
        <description>Queries a WDM for a list of monitorable interfaces</description>
        <oid_index>.1.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.2</oid_index>
        <index_order>ifIndex</index_order>
        <index_order_type>numeric</index_order_type>
        <index_title_format>|chosen_order_field|</index_title_format>

        <fields>
                <ifIndex>
                        <name>Index</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.2</oid>
                </ifIndex>
                <ifOperStatus>
                        <name>Status</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.7</oid>
                </ifOperStatus>
                <ifType>
                        <name>Type</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.3</oid>
                </ifType>
                <ifHCInOctets>
                        <name>Bytes In - 64-bit Counters</name>
                        <method>get</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.7737.6.2.12.2.11.1.1.2</oid>
                        <oid_suffix>3</oid_suffix>
                </ifHCInOctets>
                <ifHCOutOctets>
                        <name>Bytes Out - 64-bit Counters</name>
                        <method>get</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.7737.6.2.12.2.11.1.1.2</oid>
                        <oid_suffix>4</oid_suffix>
                </ifHCOutOctets>
        </fields>
</interface>
and here is the Verbose Query:
+ Running data query [48].
+ Found type = '3' [SNMP Query].
+ Found data query XML file at '/usr/local/share/cacti/resource/snmp_queries/interface-ciena_a_classic.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.7737.7.2.9.2.1.8.1.1.2' Index Count: 18
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.1.1' value: '1360003072'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.1.2' value: '1361051648'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.1.3' value: '1362100224'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.1.4' value: '1363148800'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.1.5' value: '1364197376'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.1.6' value: '1365245952'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.2.1' value: '1376780288'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.2.2' value: '1377828864'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.2.3' value: '1378877440'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.4.1' value: '1410334720'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.4.2' value: '1411383296'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.4.3' value: '1412431872'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.6.1' value: '1443889152'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.6.2' value: '1444937728'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.6.3' value: '1445986304'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.6.4' value: '1447034880'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.6.5' value: '1448083456'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.6.6' value: '1449132032'
+ Located input field 'ifIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.2'
+ Found item [ifIndex='1360003072'] index: 1 [from value]
+ Found item [ifIndex='1361051648'] index: 2 [from value]
+ Found item [ifIndex='1362100224'] index: 3 [from value]
+ Found item [ifIndex='1363148800'] index: 4 [from value]
+ Found item [ifIndex='1364197376'] index: 5 [from value]
+ Found item [ifIndex='1365245952'] index: 6 [from value]
+ Found item [ifIndex='1376780288'] index: 1 [from value]
+ Found item [ifIndex='1377828864'] index: 2 [from value]
+ Found item [ifIndex='1378877440'] index: 3 [from value]
+ Found item [ifIndex='1410334720'] index: 1 [from value]
+ Found item [ifIndex='1411383296'] index: 2 [from value]
+ Found item [ifIndex='1412431872'] index: 3 [from value]
+ Found item [ifIndex='1443889152'] index: 1 [from value]
+ Found item [ifIndex='1444937728'] index: 2 [from value]
+ Found item [ifIndex='1445986304'] index: 3 [from value]
+ Found item [ifIndex='1447034880'] index: 4 [from value]
+ Found item [ifIndex='1448083456'] index: 5 [from value]
+ Found item [ifIndex='1449132032'] index: 6 [from value]
+ Located input field 'ifOperStatus' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.7'
+ Found item [ifOperStatus='Testing'] index: 1 [from value]
+ Found item [ifOperStatus='Down'] index: 2 [from value]
+ Found item [ifOperStatus='Down'] index: 3 [from value]
+ Found item [ifOperStatus='Down'] index: 4 [from value]
+ Found item [ifOperStatus='Down'] index: 5 [from value]
+ Found item [ifOperStatus='Down'] index: 6 [from value]
+ Found item [ifOperStatus='Down'] index: 1 [from value]
+ Found item [ifOperStatus='Down'] index: 2 [from value]
+ Found item [ifOperStatus='Down'] index: 3 [from value]
+ Found item [ifOperStatus='Down'] index: 1 [from value]
+ Found item [ifOperStatus='Down'] index: 2 [from value]
+ Found item [ifOperStatus='Down'] index: 3 [from value]
+ Found item [ifOperStatus='Down'] index: 1 [from value]
+ Found item [ifOperStatus='Down'] index: 2 [from value]
+ Found item [ifOperStatus='Down'] index: 3 [from value]
+ Found item [ifOperStatus='Down'] index: 4 [from value]
+ Found item [ifOperStatus='Down'] index: 5 [from value]
+ Found item [ifOperStatus='Down'] index: 6 [from value]
+ Located input field 'ifType' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.3'
+ Found item [ifType='12'] index: 1 [from value]
+ Found item [ifType='12'] index: 2 [from value]
+ Found item [ifType='12'] index: 3 [from value]
+ Found item [ifType='12'] index: 4 [from value]
+ Found item [ifType='12'] index: 5 [from value]
+ Found item [ifType='12'] index: 6 [from value]
+ Found item [ifType='12'] index: 1 [from value]
+ Found item [ifType='12'] index: 2 [from value]
+ Found item [ifType='14'] index: 3 [from value]
+ Found item [ifType='12'] index: 1 [from value]
+ Found item [ifType='12'] index: 2 [from value]
+ Found item [ifType='14'] index: 3 [from value]
+ Found item [ifType='12'] index: 1 [from value]
+ Found item [ifType='12'] index: 2 [from value]
+ Found item [ifType='12'] index: 3 [from value]
+ Found item [ifType='12'] index: 4 [from value]
+ Found item [ifType='12'] index: 5 [from value]
+ Found item [ifType='12'] index: 6 [from value]
Everything seems to be good, but when I triy to create graphs, I only have 6 indexes (the last 6, starting with "144")
Do you have any ideas why?

And graphs are empty, like the ouput values are not fetch..

Regards,
Errare humanum est, perseverare diabolicum
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: XML Data Query for Ciena

Post by BSOD2600 »

Looks like you're off by an OID. try

Code: Select all

<oid_index>.1.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.2.1.1</oid_index>
snip
                <ifIndex>
                        <name>Index</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.2.1.1</oid>
                </ifIndex>
DraGun
Posts: 44
Joined: Thu May 24, 2012 11:21 am

Re: XML Data Query for Ciena

Post by DraGun »

Hi,

If I change that OID index, this is what I get on the verbose query (the end of it is the same as the previous I gave):
+ Running data query [48].
+ Found type = '3' [SNMP Query].
+ Found data query XML file at '/usr/local/share/cacti/resource/snmp_queries/interface-ciena_a_classic.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.7737.7.2.9.2.1.8.1.1.2.1.1' Index Count: 6
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.1.1' value: '1360003072'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.1.2' value: '1361051648'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.1.3' value: '1362100224'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.1.4' value: '1363148800'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.1.5' value: '1364197376'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.1.6' value: '1365245952'
+ Located input field 'ifIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.2.1.1'
+ Found item [ifIndex='1360003072'] index: 1 [from value]
+ Found item [ifIndex='1361051648'] index: 2 [from value]
+ Found item [ifIndex='1362100224'] index: 3 [from value]
+ Found item [ifIndex='1363148800'] index: 4 [from value]
+ Found item [ifIndex='1364197376'] index: 5 [from value]
+ Found item [ifIndex='1365245952'] index: 6 [from value]
I only can create graphs for the first 6 indexes..

Rgds
Errare humanum est, perseverare diabolicum
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: XML Data Query for Ciena

Post by BSOD2600 »

Your fist post you said there was only 6 interfaces. What is the problem?

post a snmpwalk of .1.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.2.1
DraGun
Posts: 44
Joined: Thu May 24, 2012 11:21 am

Re: XML Data Query for Ciena

Post by DraGun »

The XML file seems to be correct in the first post. It has the number of interfaces the device really has.
[lde@xxxxx /usr/local/share/cacti/resource/snmp_queries]$ snmpwalk -v2c -c X xxx.xxx.xxx.xxx .1.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.2.1
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.2.1.1.1 = Gauge32: 1360003072
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.2.1.1.2 = Gauge32: 1361051648
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.2.1.1.3 = Gauge32: 1362100224
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.2.1.1.4 = Gauge32: 1363148800
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.2.1.1.5 = Gauge32: 1364197376
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.2.1.1.6 = Gauge32: 1365245952
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.2.1.2.1 = Gauge32: 1376780288
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.2.1.2.2 = Gauge32: 1377828864
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.2.1.2.3 = Gauge32: 1378877440
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.2.1.4.1 = Gauge32: 1410334720
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.2.1.4.2 = Gauge32: 1411383296
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.2.1.4.3 = Gauge32: 1412431872
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.2.1.6.1 = Gauge32: 1443889152
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.2.1.6.2 = Gauge32: 1444937728
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.2.1.6.3 = Gauge32: 1445986304
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.2.1.6.4 = Gauge32: 1447034880
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.2.1.6.5 = Gauge32: 1448083456
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.2.1.6.6 = Gauge32: 1449132032
my first problem is when I try to create graphs, I can only see 6 indexes.
My second is my graphs are empty..
but I'd like to first see all my interfaces ;)
Attachments
ciena.PNG
ciena.PNG (8.39 KiB) Viewed 2444 times
Errare humanum est, perseverare diabolicum
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: XML Data Query for Ciena

Post by BSOD2600 »

Do you have the MIB for this vendor?
It would be helpful to figure out exactly what the difference between SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.2.1.1.1 and SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.2.1.1.6 are intended for, since they all appear to be counters. Either that or this device implements multi-valued indexes which Cacti can only handle via custom script (there are plenty of examples on the script forum).
DraGun
Posts: 44
Joined: Thu May 24, 2012 11:21 am

Re: XML Data Query for Ciena

Post by DraGun »

.1.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.2.1.x.y
x: slot
y: port

In this device, the card in slot 1 has 6 ports, the one in slot 2 only 3 ports etc etc

It's really no counters. It gives the indexes of the interface.
Having a xml file would be easier for me. With an "Input Data Method", I'll have to give the slot and the port in arguments for the script. It will take a long time to create all graphs (got 59 devices, with at least 6 ports...)

But if I don't have choice..

Regards
Errare humanum est, perseverare diabolicum
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: XML Data Query for Ciena

Post by BSOD2600 »

ah, so it IS a mutli-valued index. Well you have two options:
1) write a script (I'd suggest php script server) so which can handle the parsing
2) use a snmp xml script (like what you have now) except modify it to use a REGEX which will join the x.y portions into a unique index for Cacti. Same idea is used in http://docs.cacti.net/howto:data_query_ ... s_a_string
DraGun
Posts: 44
Joined: Thu May 24, 2012 11:21 am

Re: XML Data Query for Ciena

Post by DraGun »

Hi,

I added this line:

Code: Select all

<oid_index_parse>OID/REGEXP:^.{37}(.*)</oid_index_parse>
and got this result:
+ Running data query [48].
+ Found type = '3' [SNMP Query].
+ Found data query XML file at '/usr/local/share/cacti/resource/snmp_queries/interface-ciena_a_classic.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.7737.7.2.9.2.1.8.1.1.2.1' Index Count: 18
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.1.1' value: '1360003072'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.1.2' value: '1361051648'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.1.3' value: '1362100224'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.1.4' value: '1363148800'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.1.5' value: '1364197376'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.1.6' value: '1365245952'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.2.1' value: '1376780288'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.2.2' value: '1377828864'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.2.3' value: '1378877440'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.4.1' value: '1410334720'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.4.2' value: '1411383296'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.4.3' value: '1412431872'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.6.1' value: '1443889152'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.6.2' value: '1444937728'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.6.3' value: '1445986304'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.6.4' value: '1447034880'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.6.5' value: '1448083456'
+ Index found at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.6.6' value: '1449132032'
+ index_parse at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.1.1' results: '1.1'
+ index_parse at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.1.2' results: '1.2'
+ index_parse at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.1.3' results: '1.3'
+ index_parse at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.1.4' results: '1.4'
+ index_parse at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.1.5' results: '1.5'
+ index_parse at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.1.6' results: '1.6'
+ index_parse at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.2.1' results: '2.1'
+ index_parse at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.2.2' results: '2.2'
+ index_parse at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.2.3' results: '2.3'
+ index_parse at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.4.1' results: '4.1'
+ index_parse at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.4.2' results: '4.2'
+ index_parse at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.4.3' results: '4.3'
+ index_parse at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.6.1' results: '6.1'
+ index_parse at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.6.2' results: '6.2'
+ index_parse at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.6.3' results: '6.3'
+ index_parse at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.6.4' results: '6.4'
+ index_parse at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.6.5' results: '6.5'
+ index_parse at OID: 'enterprises.7737.7.2.9.2.1.8.1.1.2.1.6.6' results: '6.6'
+ Located input field 'ifIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.2.1'
+ Found item [ifIndex='1360003072'] index: 1.1 [from value]
+ Found item [ifIndex='1361051648'] index: 1.2 [from value]
+ Found item [ifIndex='1362100224'] index: 1.3 [from value]
+ Found item [ifIndex='1363148800'] index: 1.4 [from value]
+ Found item [ifIndex='1364197376'] index: 1.5 [from value]
+ Found item [ifIndex='1365245952'] index: 1.6 [from value]
+ Found item [ifIndex='1376780288'] index: 2.1 [from value]
+ Found item [ifIndex='1377828864'] index: 2.2 [from value]
+ Found item [ifIndex='1378877440'] index: 2.3 [from value]
+ Found item [ifIndex='1410334720'] index: 4.1 [from value]
+ Found item [ifIndex='1411383296'] index: 4.2 [from value]
+ Found item [ifIndex='1412431872'] index: 4.3 [from value]
+ Found item [ifIndex='1443889152'] index: 6.1 [from value]
+ Found item [ifIndex='1444937728'] index: 6.2 [from value]
+ Found item [ifIndex='1445986304'] index: 6.3 [from value]
+ Found item [ifIndex='1447034880'] index: 6.4 [from value]
+ Found item [ifIndex='1448083456'] index: 6.5 [from value]
+ Found item [ifIndex='1449132032'] index: 6.6 [from value]
+ Located input field 'ifOperStatus' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.7'
+ Found item [ifOperStatus='Testing'] index: 1.1 [from value]
+ Found item [ifOperStatus='Down'] index: 1.2 [from value]
+ Found item [ifOperStatus='Down'] index: 1.3 [from value]
+ Found item [ifOperStatus='Down'] index: 1.4 [from value]
+ Found item [ifOperStatus='Down'] index: 1.5 [from value]
+ Found item [ifOperStatus='Down'] index: 1.6 [from value]
+ Found item [ifOperStatus='Down'] index: 2.1 [from value]
+ Found item [ifOperStatus='Down'] index: 2.2 [from value]
+ Found item [ifOperStatus='Down'] index: 2.3 [from value]
+ Found item [ifOperStatus='Down'] index: 4.1 [from value]
+ Found item [ifOperStatus='Down'] index: 4.2 [from value]
+ Found item [ifOperStatus='Down'] index: 4.3 [from value]
+ Found item [ifOperStatus='Down'] index: 6.1 [from value]
+ Found item [ifOperStatus='Down'] index: 6.2 [from value]
+ Found item [ifOperStatus='Down'] index: 6.3 [from value]
+ Found item [ifOperStatus='Down'] index: 6.4 [from value]
+ Found item [ifOperStatus='Down'] index: 6.5 [from value]
+ Found item [ifOperStatus='Down'] index: 6.6 [from value]
+ Located input field 'ifType' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.3'
+ Found item [ifType='12'] index: 1.1 [from value]
+ Found item [ifType='12'] index: 1.2 [from value]
+ Found item [ifType='12'] index: 1.3 [from value]
+ Found item [ifType='12'] index: 1.4 [from value]
+ Found item [ifType='12'] index: 1.5 [from value]
+ Found item [ifType='12'] index: 1.6 [from value]
+ Found item [ifType='12'] index: 2.1 [from value]
+ Found item [ifType='12'] index: 2.2 [from value]
+ Found item [ifType='14'] index: 2.3 [from value]
+ Found item [ifType='12'] index: 4.1 [from value]
+ Found item [ifType='12'] index: 4.2 [from value]
+ Found item [ifType='14'] index: 4.3 [from value]
+ Found item [ifType='12'] index: 6.1 [from value]
+ Found item [ifType='12'] index: 6.2 [from value]
+ Found item [ifType='12'] index: 6.3 [from value]
+ Found item [ifType='12'] index: 6.4 [from value]
+ Found item [ifType='12'] index: 6.5 [from value]
+ Found item [ifType='12'] index: 6.6 [from value]
seems ok, and I see all my interfaces when I want to create a graph :)
My graph is still empty though.

Could a bad interpretation of the status affect the result of the query?
i.e. all the interfaces (except the first one) are UP, but in the verbose query, they are down.
ifOperStatus returns 2 for up, 3 for down. But cacti seems to see 2 as down and 3 as testing...
snmpget -v2c -c xxx XXXXXXXX .1.3.6.1.4.1.7737.6.2.12.2.11.1.1.2.1361051648.3
SNMPv2-SMI::enterprises.7737.6.2.12.2.11.1.1.2.1361051648.3 = Counter64: 27153012958840
snmpget -v2c -c xxx XXXXXXXX .1.3.6.1.4.1.7737.6.2.12.2.11.1.1.2.1361051648.3
SNMPv2-SMI::enterprises.7737.6.2.12.2.11.1.1.2.1361051648.3 = Counter64: 27153015448010
Errare humanum est, perseverare diabolicum
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: XML Data Query for Ciena

Post by BSOD2600 »

1) for times like this, it's really helpful to have the vendor MIB file(s) loaded so the snmpwalk is correctly parsed. do you have it?
2) post a snmpwalk of 1.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.7 so we can see what the raw data looks like before cacti interprets.
DraGun
Posts: 44
Joined: Thu May 24, 2012 11:21 am

Re: XML Data Query for Ciena

Post by DraGun »

gslamAGPortPrimaryState OBJECT-TYPE
(.1.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.7)
SYNTAX PrimaryStateValue
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"Indicates the primary state of this GSLAM-AG port."
::= { gslamAGPortEntry 7 }
snmpwalk -v2c -c xxx XXXXXXX 1.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.7
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.7.1.1.1 = INTEGER: 3
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.7.1.1.2 = INTEGER: 2
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.7.1.1.3 = INTEGER: 2
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.7.1.1.4 = INTEGER: 2
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.7.1.1.5 = INTEGER: 2
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.7.1.1.6 = INTEGER: 2
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.7.1.2.1 = INTEGER: 2
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.7.1.2.2 = INTEGER: 2
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.7.1.2.3 = INTEGER: 2
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.7.1.4.1 = INTEGER: 2
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.7.1.4.2 = INTEGER: 2
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.7.1.4.3 = INTEGER: 2
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.7.1.6.1 = INTEGER: 2
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.7.1.6.2 = INTEGER: 2
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.7.1.6.3 = INTEGER: 2
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.7.1.6.4 = INTEGER: 2
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.7.1.6.5 = INTEGER: 2
SNMPv2-SMI::enterprises.7737.7.2.9.2.1.8.1.1.7.1.6.6 = INTEGER: 2

I have the documentation for the MIB :)
Errare humanum est, perseverare diabolicum
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests