Cacti - defining an OID encapsulating index value.

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

Moderators: Developers, Moderators

Post Reply
cavver
Posts: 11
Joined: Tue Apr 24, 2007 3:17 am

Cacti - defining an OID encapsulating index value.

Post by cavver »

Is it posible to specify the OID for the query so that the index is inside the OID ?
E>G:
Index 192.161.222.222
Query OID : 1.1.1.1.192.168.222.222.1.1.
I hoped that setting the oid to just 1.1.1.1.192.168.222.222. and having walk as method would get me the results (snmpwalk returns a valid response for this OID whilst snmpget returns non-existant ) however I think that cactid is not performig a snmpwalk on the target.
Thanks .
V
marnues
Posts: 40
Joined: Fri Mar 02, 2007 4:33 pm

Post by marnues »

I ran into the same problem and I think that you have to use a script to handle this situation.
It would be wonderful if this was ever changed, especially since I'm having problems with indexed scripts.
Of course, maybe I just didn't find the method to use for putting an index in the middle of an oid.
tdjb
Posts: 18
Joined: Mon Oct 16, 2006 6:29 pm

Post by tdjb »

I'm not sure if I totally understand what you are trying to do but you MIGHT find that using the oid_index_parse feature will get you what you want.
As an example here is how one of our query xml file starts:

<oid_index>.x.x.x.x.x.x.x.3.3.1.1.1</oid_index>
<oid_index_parse>OID/REGEXP:^.{29}(.*)</oid_index_parse>

If you do an snmpwalk on that oid you get something like:

SNMPv2-SMI::enterprises.x.3.3.1.1.1.1.0.11.22.33.44.243 = INTEGER: 1
SNMPv2-SMI::enterprises.x.3.3.1.1.1.1.0.11.22.33.44.54 = INTEGER: 1

So it ends up kind of "greping" each OID which in our case represents a MAC address.
Not sure how much that helps or if it's even what you are looking for.
There is some more information at http://docs.cacti.net/node/29
cavver
Posts: 11
Joined: Tue Apr 24, 2007 3:17 am

Post by cavver »

The problem is that after parsing the OID i need to add some trailing chars to it :(.
Also I am missing a way to get a composite index table , e.g look into multiple snmp table queries in order to produce a composite table ( cisco QOS anyone ;)? ) .
marnues
Posts: 40
Joined: Fri Mar 02, 2007 4:33 pm

Post by marnues »

hehe, that's exactly what I'm working on
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

This qill requires some tricky SCRIPT DATA QUERY which not only gets all the SNMP stuff but appends whatever you need
Reinhard
cavver
Posts: 11
Joined: Tue Apr 24, 2007 3:17 am

Post by cavver »

Well , maybe script works for one or two instances , but here I am talking of about 1000 values which need to be read :(. SO script is not quite of an option. If only I could generate the OID's to read via script then read tem via snmp :(.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

I came accross a similar problem quite lately. And I second your request. But it is not available yet. A code change would definitively be required
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests