Querying single snmp in range of indexes

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

Moderators: Developers, Moderators

Post Reply
k2skis
Posts: 1
Joined: Mon Jan 04, 2010 9:16 am

Querying single snmp in range of indexes

Post by k2skis »

I'm new to writing my own snmp queries and am a little confused how to handle a scenario where I am trying to monitor the amount of data being replicated between two disk shelves. I have the OID I need to query, but the query returns a range of indexes that give a view of the last 10 replica sizes. I would want cacti to just grab the oldest (lowest) index in the query for graphing.

Example: Walking .1.3.6.1.4.d1.12740.5.1.7.33.1.4.347955726.15 gives me the following. The indexes will increment as each new replica copies, in this case I would want to grab *.6743 (the lowest index in the OID). Next time the lowest would be .6744, and so on. I can not grab the latest as it will be 0 if the replica is still running.

enterprises.12740.5.1.7.33.1.4.347955726.15.1.6743 = 2
enterprises.12740.5.1.7.33.1.4.347955726.15.1.6744 = 2
enterprises.12740.5.1.7.33.1.4.347955726.15.1.6745 = 2
enterprises.12740.5.1.7.33.1.4.347955726.15.1.6746 = 2
enterprises.12740.5.1.7.33.1.4.347955726.15.1.6747 = 2
enterprises.12740.5.1.7.33.1.4.347955726.15.1.6748 = 2
enterprises.12740.5.1.7.33.1.4.347955726.15.1.6749 = 2
enterprises.12740.5.1.7.33.1.4.347955726.15.1.6750 = 2
enterprises.12740.5.1.7.33.1.4.347955726.15.1.6751 = 2
enterprises.12740.5.1.7.33.1.4.347955726.15.1.6752 = 3

Thanks in advance for any help!
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

I've seen ugly things going on with snmp tables. That new one seems to fit into the "10 topmost SNMP horror stories".
You will require a command line script written in your favorite programming language, that grep's out the "correct" index by means of your own logic. There's nothing that cacti's data queries can do for you here.
R
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests