using values for index

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

Moderators: Developers, Moderators

Post Reply
bigDan
Posts: 3
Joined: Wed Oct 12, 2005 4:42 pm

using values for index

Post by bigDan »

I'm trying to create an snmp query and I seem to end up w/ the last oid number in the string as the index. I'd imagine that it has something to do w/ the way it's parsing, but alas I have no knowledge of regex. I've searched around and looked at the interfaces.xml and still have no clue. I'm hoping someone could look at my xml wand tell me wtf I'm doing wrong.
<interface>
<name>Get CSS Content Flows</name>
<description>Queries a host for a list of monitorable content flows</description>
<oid_index>.1.3.6.1.4.1.2467.1.16.4.1.25</oid_index>
<fields>
<apCntByteCountIndex>
<name>Bytes Passed</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.2467.1.16.4.1.25</oid>
</apCntByteCountIndex>
<apCntName>
<name>Content Name</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.2467.1.16.4.1.2</oid>
</apCntName>
</fields>
</interface>
Thanks in advance
bigDan
Posts: 3
Joined: Wed Oct 12, 2005 4:42 pm

Post by bigDan »

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

Post by BSOD2600 »

What data would this script return, a string of text? Cacti/rrdtool needs numbers. Walk the OID index and paste the results.
dgamble
Cacti User
Posts: 68
Joined: Tue Mar 08, 2005 4:50 pm
Location: Calgary, AB, CA

Post by dgamble »

Holy, I was just working on this this week. Check out my "Poller does not get graph data for Data Query" post today for a working Arrowpoint Content XML Data Query! :D The Module XML in the post seems to be broken though, sorry!

The main issue is that the device uses "long" indexes with multiple elements. I use a regex to peel off the part of the OID that serves as the index. As a FYI, the "index" is a string of the content owner name, content rule name, and octets for the length of them.

Hope that helps!
bigDan
Posts: 3
Joined: Wed Oct 12, 2005 4:42 pm

Post by bigDan »

the last oid would return a string of text. sadly my cacti installation is broken right now and i have to wait for the admin to upgrade the installation before i can test any further. i'll revisit this after i test again after the upgrade.
dgamble
Cacti User
Posts: 68
Joined: Tue Mar 08, 2005 4:50 pm
Location: Calgary, AB, CA

Post by dgamble »

bigDan wrote:the last oid would return a string of text. sadly my cacti installation is broken right now and i have to wait for the admin to upgrade the installation before i can test any further. i'll revisit this after i test again after the upgrade.
No, you don't use the value of the OID. You use a piece of the OID itself to get the index. There are a few examples in the forum recently of people doing this, if you get stuck.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests