Custom SNMP Data Query Query

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

Moderators: Developers, Moderators

Post Reply
johng7777777
Posts: 18
Joined: Thu Jan 19, 2012 3:11 pm

Custom SNMP Data Query Query

Post by johng7777777 »

Hi,

So I have been mucking with this for a couple days now and am stumped.

Here is some basic info on our Cacti install:

Version: 0.8.7i
OS: CentOS 5.8

What I am trying to do is create a custom SNMP Data Query to return interface statistics on a device called a BTI 7000 Ethernet Switch.

I have followed the tutorial here: http://docs.cacti.net/manual:087:3a_adv ... alkthrough

and also compared it to one here:

http://www.mad-hacking.net/documentatio ... -query.xml

But I am missing something. Right now my install isn't rendering any graphs.

Here is my XML file in /var/www/cacti/resource/snmp_queries:

[root@sflow snmp_queries]# cat BTI_XML_Slot5_Port1.xml

<interface>
<name>Get BTI 7000 10 GIG Information</name>
<description>Get SNMP BTI 7000 10 Gig Interface data from pvxL2IFCrntPMTBYCRXValue</description>
<index_order_type>numeric</index_order_type>
<oid_index>.1.3.6.1.4.1.18070.2.2.1.6.29</oid_index>

<fields>
<pvxL2IFCrntPMTBYCRXValueIndex>
<name>Index</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.18070.2.2.1.6.29</oid>
</pvxL2IFCrntPMTBYCRXValueIndex>

<pvxL2IFCrntPMTBYCRX>
<name>Value</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.18070.2.2.1.6.29.1.23.2.1.5.2.1.3</oid>
</pvxL2IFCrntPMTBYCRX>
</fields>
</interface>
[root@sflow snmp_queries]#

-----------------

I have created a Data Query, a Data Template and a Graph Template and then associated that Graph Template with the Data Query.

Something is wrong though....

In brief what I am after is this:

[root@sflow ~]# snmpwalk -v 2c -c fakey xxx.xxx.xxx.xxx .1.3.6.1.4.1.18070.2.2.1.6.29.1.23.2.1.5.2.1.3
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.2.1.5.xGigE.1.untimed = Counter64: 32365532408801
[root@sflow ~]#

But that brings me up to another question that I am confused on.... this OID is very specific to this switch. Everything after .23 means this:

Switch: 2
Shelf: 1
Slot: 5
PortType: xGigE(2)
Port: 1
IntervalType: Untimed (3)

Ideally, I would somehow want Cacti to determine what to graph "automagically" based upon what the walk returns. Say for instance I would want to graph Switch 1, Shelf 2, Slot 7....

What would I need to make the XML to accomplish this? So I guess I have two questions for the group.

Here is another SNMP Walk that illustrates what is returned from the switch in question if I don't get too specific and go up in the MIB Tree a bit:

[root@sflow ~]# snmpwalk -v 2c -c fakey xxx.xxx.xxx.xxx .1.3.6.1.4.1.18070.2.2.1.6.29.1.23 (That OID Translates to BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue)

BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.13.gigE.1.min15 = Counter64: 22050
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.13.gigE.1.day1 = Counter64: 3514962
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.13.gigE.1.untimed = Counter64: 418131169
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.13.gigE.2.min15 = Counter64: 1023808
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.13.gigE.2.day1 = Counter64: 170898254
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.13.gigE.2.untimed = Counter64: 24587755018
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.13.gigE.3.min15 = Counter64: 766584
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.13.gigE.3.day1 = Counter64: 173372036
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.13.gigE.3.untimed = Counter64: 15964499608
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.13.gigE.7.min15 = Counter64: 602674624
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.13.gigE.7.day1 = Counter64: 76164329971
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.13.gigE.7.untimed = Counter64: 11476341286145
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.13.gigE.8.min15 = Counter64: 2383621628
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.13.gigE.8.day1 = Counter64: 318722784685
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.13.gigE.8.untimed = Counter64: 18667531104748
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.13.gigE.10.min15 = Counter64: 1576389150
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.13.gigE.10.day1 = Counter64: 199620965373
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.13.gigE.10.untimed = Counter64: 11277505147394
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.13.gigE.11.min15 = Counter64: 734911171
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.13.gigE.11.day1 = Counter64: 85424592301
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.13.gigE.11.untimed = Counter64: 5184540303460
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.13.gigE.13.min15 = Counter64: 776513648
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.13.gigE.13.day1 = Counter64: 109405968374
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.13.gigE.13.untimed = Counter64: 6023053983446
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.13.xGigE.2.min15 = Counter64: 10996722496
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.13.xGigE.2.day1 = Counter64: 1497136215412
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.13.xGigE.2.untimed = Counter64: 112833619310714
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.17.gigE.1.min15 = Counter64: 184683192
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.17.gigE.1.day1 = Counter64: 17292326257
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.17.gigE.1.untimed = Counter64: 2469488413189
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.17.gigE.2.min15 = Counter64: 493937
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.17.gigE.2.day1 = Counter64: 79844934
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.17.gigE.2.untimed = Counter64: 11529075075
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.17.gigE.3.min15 = Counter64: 42014
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.17.gigE.3.day1 = Counter64: 6510378
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.17.gigE.3.untimed = Counter64: 951949648
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.17.xGigE.2.min15 = Counter64: 7096573418
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.17.xGigE.2.day1 = Counter64: 928014451699
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.1.1.17.xGigE.2.untimed = Counter64: 57213713883858
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.2.1.5.xGigE.1.min15 = Counter64: 3726407667
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.2.1.5.xGigE.1.day1 = Counter64: 459328496925
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.2.1.5.xGigE.1.untimed = Counter64: 32368220464797
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.2.1.5.xGigE.5.min15 = Counter64: 15525093312
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.2.1.5.xGigE.5.day1 = Counter64: 1939688534541
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.2.1.5.xGigE.5.untimed = Counter64: 345666939742253
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.2.1.9.xGigE.1.min15 = Counter64: 2717863528
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.2.1.9.xGigE.1.day1 = Counter64: 368858289179
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.2.1.9.xGigE.1.untimed = Counter64: 24187087619644
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.2.1.9.xGigE.5.min15 = Counter64: 32245492263
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.2.1.9.xGigE.5.day1 = Counter64: 4045457036597
BTI-7000-MIB::pvxL2IFCrntPMTBYCRXValue.2.1.9.xGigE.5.untimed = Counter64: 399166396070319
[root@sflow ~]#

If this helps the MIB Browser from IReasoning says these are my indexes:

pvxL2IFCrntPMSwitchIdx, pvxL2IFCrntPMShelfIdx, pvxL2IFCrntPMSlotIdx, pvxL2IFCrntPMPortTypeIdx, pvxL2IFCrntPMPortIdx, pvxL2IFCrntPMIntervalTypeIdx

If anyone can lend some insight it would be much appreciated!

Thanks,
jg
lmhorsky
Posts: 3
Joined: Fri Feb 07, 2014 2:59 pm

Re: Custom SNMP Data Query Query

Post by lmhorsky »

Were you ever able to get this working? I am trying a similar thing with a BTI 7000 and haven't had much luck yet.
shaiful
Posts: 2
Joined: Mon Apr 21, 2014 8:10 am

Re: Custom SNMP Data Query Query

Post by shaiful »

hi johng7777777

Did you solved this? i'm planning to monitor my BTI 7000 interface statistic in my network.
thuck
Posts: 21
Joined: Mon Mar 09, 2009 6:13 pm

Re: Custom SNMP Data Query Query

Post by thuck »

Not sure if he got this working or not, but this looks like a job for the oid_parse_index in the interface xml.
Depending what he wanted, since it is not 100% clear for me it would need to change the <source> in the interface xml to use OID/REGEX too.
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests