Another Cisco Class Map Statistics - no script server (ugly)

Templates, scripts for templates, scripts and requests for templates.

Moderators: Moderators, Developers

Author
Message
User avatar
JorisFRST
Cacti User
Posts: 219
Joined: Mon Oct 02, 2006 1:22 pm
Location: Belgium
Contact:

Re: Another Cisco Class Map Statistics - no script server (u

#16 Post by JorisFRST » Tue Aug 06, 2019 4:04 am

Hi,

you should do a verbose, it should show up something, even when there's no indexes.

Try to do a snmpwalk from the cacti server on the device for following oid : .1.3.6.1.4.1.9.9.166.1.15.1.1.11
Joris.
http://www.routerjanitor.com

taanvox
Posts: 4
Joined: Fri Aug 02, 2019 10:34 am

Re: Another Cisco Class Map Statistics - no script server (u

#17 Post by taanvox » Wed Aug 07, 2019 6:01 am

JorisFRST wrote:Hi,

you should do a verbose, it should show up something, even when there's no indexes.

Try to do a snmpwalk from the cacti server on the device for following oid : .1.3.6.1.4.1.9.9.166.1.15.1.1.11
Hi Joris,

I did a verbose, but "class map & service policy" not show item or rows.
Can you help me, pls ?
Attachments
cacti error.png
cacti error.png (23.7 KiB) Viewed 444 times

User avatar
JorisFRST
Cacti User
Posts: 219
Joined: Mon Oct 02, 2006 1:22 pm
Location: Belgium
Contact:

Re: Another Cisco Class Map Statistics - no script server (ugly)

#18 Post by JorisFRST » Tue Aug 20, 2019 8:51 am

Sorry for the late answer

but did you manage to do an snmpwalk for the device ?

Thanks,

Joris.
Joris.
http://www.routerjanitor.com

taanvox
Posts: 4
Joined: Fri Aug 02, 2019 10:34 am

Re: Another Cisco Class Map Statistics - no script server (ugly)

#19 Post by taanvox » Fri Aug 23, 2019 12:18 am

JorisFRST wrote:
Tue Aug 20, 2019 8:51 am
Sorry for the late answer

but did you manage to do an snmpwalk for the device ?

Thanks,

Joris.
I have manage an snmpwalk for the device

garanadhav
Posts: 4
Joined: Tue Nov 19, 2019 11:55 pm

Re: Another Cisco Class Map Statistics - no script server (ugly)

#20 Post by garanadhav » Wed Nov 20, 2019 9:39 pm

JorisFRST wrote:
Thu Jan 19, 2017 9:29 am
This is my way to address the issue that the Class Map Statistics are not properly indexed on Cisco gear.
It involves some manual work when setting up the graphs, but this method does not use the script-server and thus does not slow your polling down, which is important in bigger environments.

Also it's very easy to add other metrics to the graphs.
The metrics I setup already :
cbQosCMPrePolicyBitRate : The bit rate of the traffic prior to executing any QoS policies.
cbQosCMPostPolicyBitRate : The bit rate of the traffic after executing QoS policies.
cbQosCMDropBitRate : The bit rate of the drops per class as the result of all features that can produce drops (e.g., police, random detect, etc.).
ManageEngine MibBrowser Free Tool_2017-01-19_14-31-20.png
These are quite easy to get from the cbQosClassMapStats table. Problem is there is zero info about the actual policy name and direction in this table.
For this we have to call another two tables, which are differently indexed. This will cause us some manual work later. The cbQosServicePolicyTable has the information about the interface the policy is applied and the direction it is applied, and the cbQosCMCfgTalbe has the names of the policies defined in the router.
Now to match those tables indexes to the indexes used in the ClassMapStats table we have to look at the cbQosObjectsTable. And since two of those tables are differently indexed we'll have to use three data queries.

Great fun all this. Now how does this look in cacti ?
Well, it could be alot worse.
Console - Create New Graphs - Google Speed Test Scrabble Word Finder Solitaire Chrome_2017-01-19_15-14-37.png
Basicly the top "Cisco - Class Based QoS Class Map Statistics is the ones you'll select to create your graphs. Know, how do you find out in which graph's you're interested ?

First, the interfaces, the bottom query will map the "qos interface" to the snmp interface index and show you the direction.
Next you can map the Class Map Name to the ConfigIndex, and then find in the top data query the graph you want to create.
I suggest renaming the graphs after you create them to something usefull as I've done in the example at the start of this post.

This might be a bit of manual work, but it beats using the script-server if you have to get a lot of those graphs.

Download :
cbQosCM.zip
Import host template (it will install the graph and 3 data queries)
copy the 3 xml files from snmp_queries folder to your cacti install snmp_queries folder

Same can be found on my blog : http://www.routerjanitor.com/2017/01/ca ... s-map.html

I thought where is a way to grep the "cbqQOSwhatever" from the xml in a way but that most probably was more a wish then a well thought solution.
Last edited by garanadhav on Fri Nov 29, 2019 12:08 am, edited 4 times in total.

User avatar
JorisFRST
Cacti User
Posts: 219
Joined: Mon Oct 02, 2006 1:22 pm
Location: Belgium
Contact:

Re: Another Cisco Class Map Statistics - no script server (ugly)

#21 Post by JorisFRST » Thu Nov 21, 2019 10:42 am

Maybe a script outside Cacti that updates the DB with the required names for these type of graphs where indexes don't match up.

Problem would be that it would only be usefull for the one type of graph. So probably why nobody made something like this.
Joris.
http://www.routerjanitor.com

seanmancini
Cacti User
Posts: 71
Joined: Wed Mar 13, 2019 3:37 pm
Location: toronto
Contact:

Re: Another Cisco Class Map Statistics - no script server (ugly)

#22 Post by seanmancini » Sat Nov 30, 2019 1:21 am

I found this OID iso.3.6.1.4.1.9.9.166.1.8.1.1.1 that shows the class map name

so.3.6.1.4.1.9.9.166.1.5.1.1.4.1043.1053 = Gauge32: 1051
iso.3.6.1.4.1.9.9.166.1.6.1.1.1.1035 = STRING: "POLICE-SETTING"
iso.3.6.1.4.1.9.9.166.1.6.1.1.2.1035 = ""
iso.3.6.1.4.1.9.9.166.1.7.1.1.1.1025 = STRING: "class-default"
iso.3.6.1.4.1.9.9.166.1.7.1.1.1.1029 = STRING: "MATCH_PREC"
iso.3.6.1.4.1.9.9.166.1.7.1.1.2.1025 = ""
iso.3.6.1.4.1.9.9.166.1.7.1.1.2.1029 = ""
iso.3.6.1.4.1.9.9.166.1.7.1.1.3.1025 = INTEGER: 3

here is the OID mib view

cbQosPolicyMapCfgEntry cbQosPolicyMapCfgEntry 1.3.6.1.4.1.9.9.166.1.6.1.1
cbQosPolicyMapName cbQosPolicyMapName 1.3.6.1.4.1.9.9.166.1.6.1.1.1
cbQosPolicyMapDesc cbQosPolicyMapDesc 1.3.6.1.4.1.9.9.166.1.6.1.1.2

Here is the output from the router its running IOS 12.4


netflow-lab#sh policy-map
Policy Map POLICE-SETTING
Class MATCH_PREC
police cir 8000 bc 1000 be 1000
conform-action transmit
exceed-action set-qos-transmit 1
violate-action drop
netflow-lab#

I am working on updating the XML to include a field that can be queried !

Thanks for the template !!!

User avatar
JorisFRST
Cacti User
Posts: 219
Joined: Mon Oct 02, 2006 1:22 pm
Location: Belgium
Contact:

Re: Another Cisco Class Map Statistics - no script server (ugly)

#23 Post by JorisFRST » Mon Dec 02, 2019 10:02 am

seanmancini wrote:
Sat Nov 30, 2019 1:21 am
I found this OID iso.3.6.1.4.1.9.9.166.1.8.1.1.1 that shows the class map name
cisco_cbQosCMCfgEntry.xml is using <oid>.1.3.6.1.4.1.9.9.166.1.7.1.1.1</oid>

and using a regex to parse 1029 for your example MATCH_PREC
Joris.
http://www.routerjanitor.com

Post Reply