dfeldt wrote:
> I think I'm not explaining myself properly. I realize a table is a list of 
> OIDs, however, this table gets generated on the fly with random parts of the 
> OID.
> 
> 
> > [EMAIL PROTECTED] ~]$ snmpwalk -cxxxxxxxxx -v1 xxx.xxx.xxx.xxx 
> > 1.3.6.1.4.1.9.9.63.1.3.1.1.1
> > SNMPv2-SMI::enterprises.9.9.63.1.3.1.1.1.288475055.1 = Hex-STRING: 11 36 DF 
> > CD A0 91 11 DD 97 15 D2 C8 AA 52 C6 92
> > SNMPv2-SMI::enterprises.9.9.63.1.3.1.1.1.288595425.1 = Hex-STRING: DE B1 35 
> > 2B A0 93 11 DD 97 33 D2 C8 AA 52 C6 92
> > SNMPv2-SMI::enterprises.9.9.63.1.3.1.1.1.288625412.2 = Hex-STRING: 91 6F 1D 
> > 5C A0 94 11 DD 97 40 D2 C8 AA 52 C6 92
> > SNMPv2-SMI::enterprises.9.9.63.1.3.1.1.1.288669435.2 = Hex-STRING: 97 D6 C1 
> > 7E A0 95 11 DD 97 49 D2 C8 AA 52 C6 92
> > SNMPv2-SMI::enterprises.9.9.63.1.3.1.1.1.288674230.2 = Hex-STRING: B4 6B 36 
> > 60 A0 95 11 DD 97 4B D2 C8 AA 52 C6 92
> > 
> 
> 
> Since I never know ahead of time what the OIDs for each call are, I can't put 
> them into a test. MRTG provides a function CnTWaLK that will walk a base OID, 
> and return the number of entries in that table. In the example above, the 
> returned value would be 5. That is what I'm looking for. Something that will 
> count the number of entries returned by .1.3.6.1.4.1.9.9.63.1.3.1.1.1 and 
> return a single number.
> 
> Dave


   The really crude solution to this is to create a plugin and run your 
snmpwalk and return the value of wc.  I'm not sure if that will satisfy any 
other conditions that haven't been mentioned.  

eg
The Cacti-style plugin:

#!/bin/bash
community=$1
host=$2
oid=$3
snmpwalk -c$community -v1 $host $oid 2>/dev/null | wc -l

   Then create the template under the device or device class you want to graph, 
populate the datapoint + threshhold + graph stuff, and then bind the template 
to the device or device class.  Wait for graphs to populate.

   If I've misunderstood something else, please let me know.


kells




-------------------- m2f --------------------

Read this topic online here:
http://forums.zenoss.com/viewtopic.php?p=26789#26789

-------------------- m2f --------------------



_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to