HI Andrey, I have tried to use the counters from Class based QOS MIB, But these OID values are changing whenever the QOS policy changes and if devices get rebooted. I have found some scripts they are using at Cacti tool. They are using Index Values to get the data.
The results are below. Class names ============== SNMPv2-SMI::enterprises.9.9.166.1.7.1.1.1.1593 = STRING: "class-default" SNMPv2-SMI::enterprises.9.9.166.1.7.1.1.1.3337361 = STRING: "Business_Data" SNMPv2-SMI::enterprises.9.9.166.1.7.1.1.1.8443441 = STRING: "Standard_Data" SNMPv2-SMI::enterprises.9.9.166.1.7.1.1.1.10530609 = STRING: "NRT_VIDEO" SNMPv2-SMI::enterprises.9.9.166.1.7.1.1.1.11456657 = STRING: "NRT_VOICE" Value in Bytes IN/OUT ====================== SNMPv2-SMI::enterprises.9.9.166.1.15.1.1.9.18.14936 = Counter32: 3803826192 SNMPv2-SMI::enterprises.9.9.166.1.15.1.1.9.18.14952 = Counter32: 3242304438 SNMPv2-SMI::enterprises.9.9.166.1.15.1.1.9.18.14968 = Counter32: 6867461 SNMPv2-SMI::enterprises.9.9.166.1.15.1.1.9.18.14984 = Counter32: 3732670453 SNMPv2-SMI::enterprises.9.9.166.1.15.1.1.9.18.15000 = Counter32: 0 SNMPv2-SMI::enterprises.9.9.166.1.15.1.1.9.32.14776 = Counter32: 3028143551 SNMPv2-SMI::enterprises.9.9.166.1.15.1.1.9.32.14792 = Counter32: 386015312 SNMPv2-SMI::enterprises.9.9.166.1.15.1.1.9.32.14808 = Counter32: 3824322544 SNMPv2-SMI::enterprises.9.9.166.1.15.1.1.9.32.14824 = Counter32: 3823232256 SNMPv2-SMI::enterprises.9.9.166.1.15.1.1.9.32.14840 = Counter32: 0 Detailed value of each class like packets, bytes, bit rates IN/OUT ================================================================== SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.18.18 = Gauge32: 4680832 SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.18.14936 = Gauge32: 11456657 SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.18.14952 = Gauge32: 10530609 SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.18.14968 = Gauge32: 3337361 SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.18.14984 = Gauge32: 8443441 SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.18.15000 = Gauge32: 1593 SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.18.4194835 = Gauge32: 14360 SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.18.4194867 = Gauge32: 12055507 SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.18.4309523 = Gauge32: 14392 SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.18.4309571 = Gauge32: 7314307 SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.18.4399667 = Gauge32: 9324867 SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.18.4514323 = Gauge32: 14424 SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.18.7081426 = Gauge32: 8721922 SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.18.9033074 = Gauge32: 5756066 SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.18.10085250 = Gauge32: 1594 SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.18.12040259 = Gauge32: 11319347 SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.18.13371330 = Gauge32: 12883938 SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.18.13451891 = Gauge32: 3412499 SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.18.13475570 = Gauge32: 10472610 SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.18.15908883 = Gauge32: 11203667 SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.32.32 = Gauge32: 12441408 SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.32.14776 = Gauge32: 10530609 SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.32.14792 = Gauge32: 3337361 SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.32.14808 = Gauge32: 11456657 SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.32.14824 = Gauge32: 8443441 SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.32.14840 = Gauge32: 1593 SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.32.681618 = Gauge32: 1594 SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.32.1917138 = Gauge32: 5756066 SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.32.5263170 = Gauge32: 10472610 SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.32.6592579 = Gauge32: 11580163 SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.32.7345586 = Gauge32: 8721922 SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.32.7477587 = Gauge32: 9544211 SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.32.8111122 = Gauge32: 12883938 SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.32.13137331 = Gauge32: 13742035 SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.32.13182419 = Gauge32: 11798003 But I much worried about how to get things (co-relate) done at our InterMapper Probe. Scripts ======= #!/usr/bin/perl #Class-based weighted fair queue interrogation module. #This module maps class names to policy-id, object-id pairs and #does an SNMP get on the bytes transmitted OID. #written by Andy Brauer #initial release 07/05/2002 #current release 26/04/2005 #current version 0.53 # # 25/04/2005 - Paul Wozney # # Completely rewritten by Paul Wozney # There was nothing really wrong with the script that Andy wrote, # but I extended it to respond to index, query and get requests # and made seperate subroutines for these # # I did this so I could integrate the script into cacti, as this # was the only script available - and I really couldn't follow # the code that Andy wrote so I figured it was easier just to # do it my way. :) # # I'm sure there are bugs. Reach me here: [email protected] # # One caveat, as I'm currently applying DSCP and policing QoS on # the same router I named my QoS classes like this "QoSnnnn" and # this script is written to see those. # # April 29 2005 - I have changed the code so it can handle # both purely numeric, and text based snmpwalk output #use warnings; use strict; my $ip = $ARGV[0]; my $community = $ARGV[1]; my $action1 = $ARGV[2]; my $action2 = $ARGV[3]; my $class = $ARGV[4]; my $filterstring = ".*"; # or to match everything #my $filterstring = "QoS"; # use this to filter out unwanted classes my $snmppath = "/net-snmp/bin/snmpwalk"; my $version = "2c"; my $index_oid = "1.3.6.1.4.1.9.9.166.1.7.1.1.1"; # lists the classes my $ilist_oid = "1.3.6.1.4.1.9.9.166.1.5.1.1.2"; # lists the references my $bytes_oid = "1.3.6.1.4.1.9.9.166.1.15.1.1.9"; # lists the pol/obj id refs sub retrieve_index { # lists the classes # this is used in the other subroutines, so if a third variable is passed "index" # it lists the references along with the classes my $node = shift; my $comm = shift; my $ind = shift; my @classes; my @index = `$snmppath -v $version -c $comm $node $index_oid`; # should output this: # SNMPv2-SMI::enterprises.9.9.166.1.7.1.1.1.1025 = STRING: "CLASS" foreach (@index) { s/"//g; my @littlearray = split / /; # if you've set $filterstring it will only display those classes you want next unless ($littlearray[3] =~ /$filterstring/); my @values = split /\./, $littlearray[0]; if ($ind eq "index") { push @classes, "$values[-1]:$littlearray[3]\n" ; } else { push @classes, "$values[-1]\n"; } } return @classes; } sub retrieve_query { # retrieves the bytes for all classes my $node = shift; my $comm = shift; my $dowhatever = shift; # the data to retrieve my @classes = @_; # gets the remaining variables passed my @bytes; my @ilist = `$snmppath -v $version -c $comm $node $ilist_oid`; # should output this: # SNMPv2-SMI::enterprises.9.9.166.1.5.1.1.2.1073.1073 = Gauge32: 1025 # note that the variable part matches the oid for the class above foreach my $entry (@ilist) { my @littlearray = split / /, $entry; my @values = split /\./, $littlearray[0]; chomp $littlearray[3]; foreach (@classes) { my ($refer, $class) = split /:/; chomp $class; chomp $refer; # if you've set $filterstring it will only display those classes you want if (($littlearray[3] eq $refer) && ($class =~ /$filterstring/)) { my $byte_count = `$snmppath -v $version -c $comm $node $bytes_oid.$values[-2].$values[-1]` ; my @byte_array = split / /, $byte_count; if ($dowhatever eq "class") { push @bytes, "$refer:$class"; } if ($dowhatever eq "bytes") { push @bytes, "$refer:$byte_array[3]"; } } } } return @bytes; } sub retrieve_get { # gets the bytes for a single class # this executes in about 10 seconds on my box, it could be # way faster if there was some kind of caching done, maybe # expire after an hour considering most people poll every 5 mins # # NOTE! I changed some internals and now it does sub-second # execution! Woot! my $node = shift; my $comm = shift; my $colour = shift; # just another variable for class, but # I hate scope problems. :) chomp $colour; my @classes = @_; my $indexval; my @ilist = `$snmppath -v $version -c $comm $node $ilist_oid`; # then figure out the oid foreach my $entry (@ilist) { my @littlearray = split / /, $entry; my @values = split /\./, $littlearray[0]; chomp $littlearray[3]; if ($colour == $littlearray[3]) { $indexval = "$values[-2].$values[-1]" ; } } # and POW! it's done. my $byte_count = `$snmppath -v $version -c $comm $node $bytes_oid.$indexval`; my @byte_array = split / /, $byte_count; return "$byte_array[3]"; } ARGUMENTS: { if ($action1 eq "index") { print retrieve_index($ip,$community) ; last ARGUMENTS; } if ($action1 eq "query") { if ($action2 eq "bytes") { print retrieve_query($ip,$community,"bytes",retrieve_index($ip,$community,"index")) ; last ARGUMENTS; } elsif ($action2 eq "class") { print retrieve_query($ip,$community,"class",retrieve_index($ip,$community,"index")) ; last ARGUMENTS; } } if ($action1 eq "get") { print retrieve_get($ip,$community,$class,retrieve_index($ip,$community,"index")) ; last ARGUMENTS; } print "usage:\n\n./nmiscbwfq.pl IP COMMUNITY index\n./nmiscbwfq.pl IP COMMUNITY query {bytes|class}\n./nmiscbwfq.pl IP COMMUNITY get {bytes} CLASS\n"; } exit; Regards Manickaraja Arumugam A R I C E N T -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Andrey Gordon Sent: Tuesday, January 27, 2009 7:53 PM To: InterMapper Discussion Subject: Re: [IM-Talk] Class based QOS monitoring. I was going to write up a probe to monitor queues on my cisco routers, but never found any useful counters in the cisco MIBs. The closest I found to monitoring throuputs in each class was total number of packets that went through that class. __________________________________________________________ Andrey Gordon | Integrity Interactive | Network Engineer | +1.781.398.3518 > From: Manickaraja Arumugam <[email protected]> > Reply-To: InterMapper Discussion <[email protected]> > Date: Tue, 27 Jan 2009 18:43:24 +0530 > To: InterMapper Discussion <[email protected]> > Subject: [IM-Talk] Class based QOS monitoring. > > Dear All, > > Please let me know if anyone using a probe for class based QOS monitoring? > > Regards > > Manickaraja Arumugam > Assistant Manager - Corporate IT > > A R I C E N T > ESPEE IT Park > Plot-5, Jawaharlal Nehru Salai, > Ekkattuthangal, > Chennai - 600 097 India > Main +9 144.442.2667 7 > Fax +9 144.442.2610 0 > Mobile +9 199.400.1130 8 > Voip +6 666.520.6677 > > > > ________________________________ > "DISCLAIMER: This message is proprietary to Aricent and is intended solely for > the use of the individual to whom it is addressed. It may contain privileged > or confidential information and should not be circulated or used for any > purpose other than for what it is intended. If you have received this message > in error,please notify the originator immediately. If you are not the intended > recipient, you are notified that you are strictly prohibited from using, > copying, altering, or disclosing the contents of this message. Aricent accepts > no responsibility for loss or damage arising from the use of the information > transmitted by this email including damage from virus." > ____________________________________________________________________ > List archives: > http://www.mail-archive.com/intermapper-talk%40list.dartware.com/ > To unsubscribe: send email to: [email protected] > ____________________________________________________________________ List archives: http://www.mail-archive.com/intermapper-talk%40list.dartware.com/ To unsubscribe: send email to: [email protected] "DISCLAIMER: This message is proprietary to Aricent and is intended solely for the use of the individual to whom it is addressed. It may contain privileged or confidential information and should not be circulated or used for any purpose other than for what it is intended. If you have received this message in error,please notify the originator immediately. If you are not the intended recipient, you are notified that you are strictly prohibited from using, copying, altering, or disclosing the contents of this message. Aricent accepts no responsibility for loss or damage arising from the use of the information transmitted by this email including damage from virus." ____________________________________________________________________ List archives: http://www.mail-archive.com/intermapper-talk%40list.dartware.com/ To unsubscribe: send email to: [email protected]
