Re: 'Inter-Tables indexing' and perl
Turbo Fredriksson <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Organization | Bah! |
| Message-ID | <[email protected]> |
[sorry for taking so long, but I've been busy with other things] Quoting Dave Shield <[email protected]>: > On Sat, 2005-10-22 at 10:46 +0200, Turbo Fredriksson wrote: >> If I read your explanation correct above, you're not supposed to >> see the index (baculaStatsIndex etc) AT ALL!? > > Correct. > >> I do (see the ...snmpwalk.txt file). > > Check the agent code - what does it return when asked for an OID > that happens to belong to an index object? It ought to completely > ignore such object - just as if they don't exist at all. I've started to modify my Bind9 SNMP Subagent that have the same problem to fix this, but can't get rid of the INDEX: ----- s n i p ----- root@aurora:~# export OID_BASE=.1.3.6.1.4.1.8767.2.1 root@aurora:~# alias snmpwalk="/usr/bin/snmpwalk -On localhost:161 private" root@aurora:~# /usr/bin/snmptable localhost:161 private $OID_BASE.3 SNMP table: enterprises.bayourCom.snmp.bind9Stats.b9stTotalsTable b9stIndexTotals b9stCounterName b9stCounterTotal b9stCounterForward b9stCounterReverse ? success 1820713 1574605 2524 ? referral 79 75 0 ? nxrrset 54522 54198 0 ? nxdomain 54564 8662 5 ? recursion 28790 2 0 ? failure 3411 1761 74 ----- s n i p ----- I'm completely ignoring the $OID_BASE.3.1.1 branch which is the index: ----- s n i p ----- root@aurora:~# snmpwalk $OID_BASE.3 | sed '[email protected]@$OID_BASE@' $OID_BASE.3.1.2.1 = success $OID_BASE.3.1.2.2 = referral $OID_BASE.3.1.2.3 = nxrrset $OID_BASE.3.1.2.4 = nxdomain $OID_BASE.3.1.2.5 = recursion $OID_BASE.3.1.2.6 = failure $OID_BASE.3.1.3.1 = 1820938 $OID_BASE.3.1.3.2 = 79 $OID_BASE.3.1.3.3 = 54551 $OID_BASE.3.1.3.4 = 54590 $OID_BASE.3.1.3.5 = 28795 $OID_BASE.3.1.3.6 = 3411 $OID_BASE.3.1.4.1 = 1574732 $OID_BASE.3.1.4.2 = 75 $OID_BASE.3.1.4.3 = 54227 $OID_BASE.3.1.4.4 = 8671 $OID_BASE.3.1.4.5 = 2 $OID_BASE.3.1.4.6 = 1761 $OID_BASE.3.1.5.1 = 2525 $OID_BASE.3.1.5.2 = 0 $OID_BASE.3.1.5.3 = 0 $OID_BASE.3.1.5.4 = 5 $OID_BASE.3.1.5.5 = 0 $OID_BASE.3.1.5.6 = 74 root@aurora:~# /usr/bin/snmpgetnext -On localhost:161 private $OID_BASE.3 | sed '[email protected]@$OID_BASE@' $OID_BASE.3.1.2.1 = success root@aurora:~# /usr/bin/snmpget -On localhost:161 private $OID_BASE.3.1.1.1 | sed '[email protected]@$OID_BASE@' Error in packet Reason: (noSuchName) There is no such variable name in this MIB. Failed object: $OID_BASE.3.1.1.1 ----- s n i p ----- And the '-Ci' works fine (even though I STILL get the b9stIndexTotals entry!): ----- s n i p ----- root@aurora:~# /usr/bin/snmptable -Ci localhost:161 private .1.3.6.1.4.1.8767.2.1.3 SNMP table: enterprises.bayourCom.snmp.bind9Stats.b9stTotalsTable index b9stIndexTotals b9stCounterName b9stCounterTotal b9stCounterForward b9stCounterReverse 1 ? success 1821336 1574922 2531 2 ? referral 79 75 0 3 ? nxrrset 54600 54276 0 4 ? nxdomain 54690 8684 5 5 ? recursion 28816 2 0 6 ? failure 3411 1761 74 ----- s n i p ----- >> Or am I missunderstanding you again? >> When you talk about 'indexes', what exactly do you mean then? > > The MIB objects referenced in the INDEX clause of the table > definition. These would normally be defined as "not-accessible", > and the agent shouldn't return values for these OIDs. It is: ----- s n i p ----- bind9Stats OBJECT IDENTIFIER ::= { snmp 1 } [...] b9stTotalsTable OBJECT-TYPE SYNTAX SEQUENCE OF B9stTotalsEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION "A list of Bind9 statistic counters (totals)." ::= { bind9Stats 3 } b9stTotalsEntry OBJECT-TYPE SYNTAX B9stTotalsEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION "An entry containing Bind9 statistics (totals)." INDEX { b9stIndexTotals } ::= { b9stTotalsTable 1 } B9stTotalsEntry ::= SEQUENCE { b9stIndexTotals CounterIndex, b9stCounterName DisplayString, b9stCounterTotal Integer32, b9stCounterForward Integer32, b9stCounterReverse Integer32 } b9stIndexTotals OBJECT-TYPE SYNTAX CounterIndex MAX-ACCESS not-accessible STATUS current DESCRIPTION "Reference Index for each counter." ::= { b9stTotalsEntry 1 } [...] ----- s n i p ----- -- domestic disruption SEAL Team 6 killed ammonium FBI nuclear FSF Albanian Qaddafi pits Rule Psix DES Uzi Kennedy toluene [See http://www.aclu.org/echelonwatch/index.html for more about this] [Or http://www.europarl.eu.int/tempcom/echelon/pdf/rapport_echelon_en.pdf] If neither of these works, try http://www.aclu.org and search for echelon. ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users