Help to build OID

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

Moderators: Developers, Moderators

Post Reply
aastudil
Posts: 1
Joined: Fri Aug 31, 2012 2:33 pm

Help to build OID

Post by aastudil »

Hey all,

I'm just starting with cacti and I've been stuck with a problem and can't move forward.

I'm trying to grab statistic of a dwdm ciena interface, and the problem is that in order to form the OID where this is statistic is I need to pull a number from another OID and include that number to finally go for OID where the data is:

i.e. if I do this:

snmpwalk -c public -v 2c 146.83.245.90 .1.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.2
iso.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.2.1.1.1 = Gauge32: 1360003072
iso.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.2.1.1.2 = Gauge32: 1361051648
iso.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.2.1.1.3 = Gauge32: 1362100224
iso.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.2.1.1.4 = Gauge32: 1363148800
iso.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.2.1.1.5 = Gauge32: 1364197376
iso.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.2.1.1.6 = Gauge32: 1365245952
iso.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.2.1.2.1 = Gauge32: 1376780288
iso.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.2.1.2.2 = Gauge32: 1377828864
iso.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.2.1.2.3 = Gauge32: 1378877440
iso.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.2.1.2.4 = Gauge32: 1379926016
iso.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.2.1.2.6 = Gauge32: 1382023168
iso.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.2.1.4.1 = Gauge32: 1410334720
iso.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.2.1.4.2 = Gauge32: 1411383296


I obtain those 10 digits numbers, those are the number that ciena use to identified the interfaces, so I need to include that number in the middle of another OID, like this.

.1.3.6.1.4.1.7737.6.2.12.2.8.3.1.2.1360003072.4

I've been working with <oid_suffix> to put the final ".4" number but I do not know how to tell cacti that it have to grab the 10 digit number and use it to complete the OID

If someone have an idea how to do this,I'll really apreciate your help.

Cheers,

Albert
artagel
Cacti User
Posts: 226
Joined: Wed May 21, 2008 11:33 pm

Re: Help to build OID

Post by artagel »

Take a look at how cacti does this using the generic snmp_query for the interface statistics. It uses an ifindex to perform another query.

Try setting 146.83.245.90 .1.3.6.1.4.1.7737.7.2.9.2.1.8.1.1.2 as your oid_index

Then doing this:
<nodeValue>
<name>ciena stats</name>
<method>get</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.7737.6.2.12.2.8.3.1.2</oid>
<oid_suffix>4</oid_suffix>
</nodeValue>

Seems like it should work.
-Dan
Please mark the topic solved if this resolves your problem.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests