Another Cisco Class Map Statistics - no script server (ugly)
Moderators: Developers, Moderators
Another Cisco Class Map Statistics - no script server (ugly)
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.). 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. 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 : 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
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.). 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. 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 : 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
Joris.
http://www.routerjanitor.com
http://www.routerjanitor.com
Re: Another Cisco Class Map Statistics - no script server (u
Thanks, the templates are working properly for us using most actual Cacti 1.1.24.
Due to the "mess" with indexes I guess what you meant with "manual work" is e.g. adding proper the proper Class Map Name to the graph title ? Seems there is no easy way to automate this somehow ?
Rgds
Chris
Due to the "mess" with indexes I guess what you meant with "manual work" is e.g. adding proper the proper Class Map Name to the graph title ? Seems there is no easy way to automate this somehow ?
Rgds
Chris
Re: Another Cisco Class Map Statistics - no script server (u
Yeah, that's exactly it, making sure the graph titles mean something.
The indexes are a mess.
I didn't find a way to do it automaticly.
Since it's all in a db in theory it must be possible to write a program outside cacti to do this for you.
But I never looked at it that far.
I'm happy it runs fast and doesn't tax my server that much as the scripted way to do it.
The indexes are a mess.
I didn't find a way to do it automaticly.
Since it's all in a db in theory it must be possible to write a program outside cacti to do this for you.
But I never looked at it that far.
I'm happy it runs fast and doesn't tax my server that much as the scripted way to do it.
Joris.
http://www.routerjanitor.com
http://www.routerjanitor.com
Re: Another Cisco Class Map Statistics - no script server (u
For now we just need it for 2 devices, but more might be added, so an automatic way would be appreciated.
I guess the |query_something| does not work ? 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.
Anyway, thanks for contributing this, saved me headaches
I guess the |query_something| does not work ? 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.
Anyway, thanks for contributing this, saved me headaches
Re: Another Cisco Class Map Statistics - no script server (u
I don't think you can query between datasources, I haven't found a way to do it.
Joris.
http://www.routerjanitor.com
http://www.routerjanitor.com
Re: Another Cisco Class Map Statistics - no script server (u
Hi,
I am using cacti version 1.1.19 and using cacti almost for 3 months, so it is new to me.
Could you share how to use the script on cacti new version 1.1.x ?
i already did follow your step for importing the xml file, but my data source template ended like this when creating new graph: this is my data source look like: And i found error on cacti graph did i miss something?
Thank You .
I am using cacti version 1.1.19 and using cacti almost for 3 months, so it is new to me.
Could you share how to use the script on cacti new version 1.1.x ?
i already did follow your step for importing the xml file, but my data source template ended like this when creating new graph: this is my data source look like: And i found error on cacti graph did i miss something?
Thank You .
Re: Another Cisco Class Map Statistics - no script server (u
Did you create a new graph from the device ?
Check your data source template, does it look like this ? (ignore datasource profile)
Check your data source template, does it look like this ? (ignore datasource profile)
Joris.
http://www.routerjanitor.com
http://www.routerjanitor.com
Re: Another Cisco Class Map Statistics - no script server (u
Hi Joris,
Thank for your prompt response,
yes, my data source is looks like yours.
After import host and copy the files to snmp_source, I did create new graph from the device but from "management" tab, because when using "New Graphs" on the create tab it doesn't have Cbqos template option, just basic in/out bits graph type.
After adding new graph and the data source is automatically created, but the "Index Value" was empty and also graph showing an error on debug
Thank you
I really appreciate your help.
Thank for your prompt response,
yes, my data source is looks like yours.
After import host and copy the files to snmp_source, I did create new graph from the device but from "management" tab, because when using "New Graphs" on the create tab it doesn't have Cbqos template option, just basic in/out bits graph type.
After adding new graph and the data source is automatically created, but the "Index Value" was empty and also graph showing an error on debug
New Data source automaticly created Graph debug I just assume that the data source Index value should not be empty, because cacti doesn't know what interface to grep.Create new Graph
Thank you
I really appreciate your help.
Re: Another Cisco Class Map Statistics - no script server (u
Hi,
that doesn't work,
you have to add the Assosicated data Queries to your devices : This will launch the xml files and lookup the indexes needed to create the graphs.
that doesn't work,
you have to add the Assosicated data Queries to your devices : This will launch the xml files and lookup the indexes needed to create the graphs.
Joris.
http://www.routerjanitor.com
http://www.routerjanitor.com
Re: Another Cisco Class Map Statistics - no script server (u
Best way to add associated data queries is to have them against a device template and then use that template against your devices. That way, as soon as you mark it as being the same device type, it will pull in the same queries.
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Re: Another Cisco Class Map Statistics - no script server (u
Hi Joris,
It works now like a magic!
I realized that I am not added the template to the device.
Thank joris , it's really helpful for me and nice work for the template. you rock
It works now like a magic!
I realized that I am not added the template to the device.
Thank joris , it's really helpful for me and nice work for the template. you rock
Re: Another Cisco Class Map Statistics - no script server (u
Hi,netniV wrote:Best way to add associated data queries is to have them against a device template and then use that template against your devices. That way, as soon as you mark it as being the same device type, it will pull in the same queries.
this is the best advice really.
I have included an example called "Cisco - Class Based QoS" in the download.
https://www.cacti.net/downloads/docs/ht ... lates.html
(in the newer versions it's called device templates and not host templates)
Joris.
http://www.routerjanitor.com
http://www.routerjanitor.com
Re: Another Cisco Class Map Statistics - no script server (u
Hi JorisFRST,
Can you help me, please ?
I added your template but my device not query data.
Device : cisco switch 4506
Can you help me, please ?
I added your template but my device not query data.
Device : cisco switch 4506
- Attachments
-
- cacti cisco qos error.png (25.03 KiB) Viewed 5909 times
Re: Another Cisco Class Map Statistics - no script server (u
Hi,
can you do a verbose query ?
I'll be back in the office on Tuesday and can have a look at the output then.
can you do a verbose query ?
I'll be back in the office on Tuesday and can have a look at the output then.
Joris.
http://www.routerjanitor.com
http://www.routerjanitor.com
Re: Another Cisco Class Map Statistics - no script server (u
JorisFRST wrote:Hi,
can you do a verbose query ?
I'll be back in the office on Tuesday and can have a look at the output then.
Hi Joris,
I did verbose query but no data query
I upload image when i add your template class-map.
- Attachments
-
- cacti cisco error.png (13.57 KiB) Viewed 5904 times
Who is online
Users browsing this forum: No registered users and 1 guest