Problem with SNMP index

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

Moderators: Developers, Moderators

Post Reply
pax_2111
Posts: 1
Joined: Fri May 15, 2009 6:02 am

Problem with SNMP index

Post by pax_2111 »

Hi all,
I am new to Cacti and ran into the following problem. I am trying to pull SNMP data from Cisco PGW. I am trying to access a table like this:

SNMPv2-SMI::enterprises.2496.1.1.3.17.1.2.65537.900 = Timeticks: (1242385209) 143 days, 19:04:12.09
SNMPv2-SMI::enterprises.2496.1.1.3.17.1.2.65537.3600 = Timeticks: (1242385209) 143 days, 19:04:12.09
SNMPv2-SMI::enterprises.2496.1.1.3.17.1.2.65537.86400 = Timeticks: (1242385209) 143 days, 19:04:12.09
SNMPv2-SMI::enterprises.2496.1.1.3.17.1.3.65537.900 = Counter32: 5579
SNMPv2-SMI::enterprises.2496.1.1.3.17.1.3.65537.3600 = Counter32: 23496
SNMPv2-SMI::enterprises.2496.1.1.3.17.1.3.65537.86400 = Counter32: 337940
SNMPv2-SMI::enterprises.2496.1.1.3.17.1.4.65537.900 = Counter32: 431
SNMPv2-SMI::enterprises.2496.1.1.3.17.1.4.65537.3600 = Counter32: 2571
SNMPv2-SMI::enterprises.2496.1.1.3.17.1.4.65537.86400 = Counter32: 78475


As you can see the Index is composite (X + 655337+timeinterval). How am I supposed to define the index in order to retrieve the data in Cacti? All my attempts so far have failed.

I'll appreciate any help.

cheers
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Going to have to use REGEX's. Consider looking/adding to http://docs.cacti.net/howto:data_query_ ... _templates

Looks like if you just split off the X.65537.X. Maybe something like the following would work:

Code: Select all

<oid_index_parse>OID/REGEXP:.*\.(655337.[0-9])$</oid_index_parse>
cacti_is_awesome
Posts: 12
Joined: Thu Apr 30, 2009 11:38 am
Location: San Diego

Try This One.....

Post by cacti_is_awesome »

<oid_index_parse>OID/REGEXP:.*\.(65537.[0-9])$</oid_index_parse>

<index>
<name>Index</name>
<method>walk</method>
<source>index</source>
<direction>input</direction>
</index>

<timeticks>
<name>TIME</name>
<source>value</source>
<method>get</method>
<direction>input</direction>
<oid>.1.3.6.1.4.1.****.65537</oid>

</timeticks>
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests