Cisco Router - Class Map statistics

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

Moderators: Developers, Moderators

bfox
Posts: 2
Joined: Wed Sep 03, 2008 10:07 am

Post by bfox »

Here is a VB based CBWFQ poller for Cacti, it actually appears to be a hell of a lot better than the Linux scripts available.

http://forums.cacti.net/viewtopic.php?t ... ight=cbwfq
dswinford wrote:Has anyone been able to de-linux a CBWFQ script? I am attempting to find a CBWFQ data source for a Windows based CACTI system.
wilperi
Posts: 12
Joined: Mon Sep 03, 2007 6:55 am

Post by wilperi »

Hi

Thanks for the script. I can gathering data from router and i can see graphs but only problem is that results are too small. The right bitflow is 20 Mbits/sek but cacti graph gives me about 2 Mbits/sek. I tested this several different class maps. Any idea?

-wilperi
wilperi
Posts: 12
Joined: Mon Sep 03, 2007 6:55 am

Post by wilperi »

Hi
In my graphs the Pre class and the drop bit rate are the same values. Whats wrong

wilperi
toe_cutter
Cacti User
Posts: 168
Joined: Fri Sep 12, 2008 2:41 am
Location: Sweden

Post by toe_cutter »

Hi all!

I just finished converting (and testing) HerzogEH's perl-script to Cacti PHP Script Server.
I had to create a new data and graph template for it with new DS-names. But i only created for my needs (pre/post/drop bitrate (64bit)). So thats all im including.

Oh, its SNMPv3 compatible too.

Fields polled by script:

Code: Select all

qosbitrate (32bit)			  	=> .1.3.6.1.4.1.9.9.166.1.15.1.1.11
qosprebitrate (32bit)		  	=> .1.3.6.1.4.1.9.9.166.1.15.1.1.7
qosdropbitrate (32bit)		 	=> .1.3.6.1.4.1.9.9.166.1.15.1.1.18
qosdropbyte (64bit)		    	=> .1.3.6.1.4.1.9.9.166.1.15.1.1.17
qosprebyte (64bit)		  		=> .1.3.6.1.4.1.9.9.166.1.15.1.1.6
qosbyte (64bit)			     	=> .1.3.6.1.4.1.9.9.166.1.15.1.1.10
qosoverflowbyte (32bit)			=> .1.3.6.1.4.1.9.9.166.1.15.1.1.8
qospreoverflowbyte (32bit)		=> .1.3.6.1.4.1.9.9.166.1.15.1.1.4
Some stats:

Code: Select all

[root@cacti /usr/local/share/cacti/scripts]# time php -q ss_qospol.php <host> "" 2:161:500:3:20:<community> index && time perl qospol.pl <host> <community> 2 index

ss_qospol.php:
real	0m0.264s
user	0m0.116s
sys	0m0.007s

qospol.pl:
real	0m1.196s
user	0m0.082s
sys	0m0.038s
So you see, almost a second faster :D

Keep in mind! New data and graph templates with new DS-names probably means that a clean update of your old qospol.pl templates isnt possible, also stuff will most likely BREAK -> BACK STUFF UP BEFORE!

@coders/devs: yeah, i know, its ugly coded and could probably loose 1/3rd of its size by using variables more/better. But it works. :)
Attachments
ss_qospol.php.txt
put it in |path_cacti|/scripts and rename to ss_qospol.php
(26.16 KiB) Downloaded 4050 times
cisco_qos.xml
put in |path_cacti|/resource/script_server
(2.9 KiB) Downloaded 3972 times
cacti_data_query_cisco_router_-_cm_stats.xml
import into cacti
(20.72 KiB) Downloaded 4154 times
rivenmyst
Posts: 3
Joined: Mon Feb 11, 2008 8:03 am

Post by rivenmyst »

Hi toe_cutter

is in the interface the inpout and output with same class, then the 2. data "nan"(Graph) or the Output: U(Log-Cacti).

Very good script. I think int the PHP Script is es a for problem.

Thanks.
rivenmyst
Posts: 3
Joined: Mon Feb 11, 2008 8:03 am

Post by rivenmyst »

Hi

hir is the patch:

Thanks
Attachments
patch_ss_qospol.php.txt
(8.45 KiB) Downloaded 3667 times
apm13
Posts: 3
Joined: Wed Dec 17, 2008 3:54 am
Contact:

Post by apm13 »

hi toe_cutter !!!
Very good script, but cacti_data_query_cisco_router_-_cm_stats.xml

Error: XML: Hash version does not exist.
mcutting
Cacti Guru User
Posts: 1884
Joined: Mon Oct 16, 2006 5:57 am
Location: United Kingdom
Contact:

Post by mcutting »

apm13 wrote:hi toe_cutter !!!
Very good script, but cacti_data_query_cisco_router_-_cm_stats.xml

Error: XML: Hash version does not exist.
This means that you are trying to import a template that was created in a newer version of Cacti than the one you are currently running. You need to upgrade your version.
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
denjer
Posts: 3
Joined: Tue Jun 29, 2010 2:22 am

Post by denjer »

Hi

Thanks for this script!


My problem:

In the sub - interface apply output hierarchical traffic policies with three different class-map(class1, class2, class3), but each class have child service-policy with same class (world-OUT, class-default)

Executing script query '/usr/local/bin/php -q /usr/local/share/cacti/scripts/ss_qospol.php X.X.X.X 4 2:161:10000:1:60:YYYYYYYYYY:::::: query ifname'
+ Found item [ifname='Gi1.169'] index: 68.Class1.2
+ Found item [ifname='Gi1.169'] index: 68.world-OUT.2
+ Found item [ifname='Gi1.169'] index: 68.class-default.2
+ Found item [ifname='Gi1.169'] index: 68.Class2.2
+ Found item [ifname='Gi1.169'] index: 68.world-OUT.2
+ Found item [ifname='Gi1.169'] index: 68.class-default.2
+ Found item [ifname='Gi1.169'] index: 68.Class3.2
+ Found item [ifname='Gi1.169'] index: 68.class-default.2


Result: I have 8 different data, but I have only 5 graph.
-----------------------------------------------------------------------------------------

Now it any more a problem - was created by a script.
Last edited by denjer on Tue Sep 07, 2010 2:14 am, edited 2 times in total.
apm13
Posts: 3
Joined: Wed Dec 17, 2008 3:54 am
Contact:

Post by apm13 »

Thanks, mcutting!!!!!
Help me pl!!! How to display "Inbound"
denjer
Posts: 3
Joined: Tue Jun 29, 2010 2:22 am

Post by denjer »

apm13 wrote:Thanks, mcutting!!!!!
Help me pl!!! How to display "Inbound"
Qos direction or Policy Direction:
1-input, 2-output
zus
Posts: 1
Joined: Tue Dec 07, 2010 6:28 am

Re: Cisco Router - Class Map statistics

Post by zus »

Hi

I have graph for SBQoS traffic per class, but have no graph for SBQoS drops per class.
what wrong?
Sorry for my english....
mcolas
Posts: 25
Joined: Fri Jan 30, 2009 4:46 am
Location: Bruxelles, Belguim

Re: Cisco Router - Class Map statistics

Post by mcolas »

Hello,

For me the script in perl works very fine but I would like know 2 things.
What's the difference between the Pre class and the post class.
What's the difference between the 5min average bitrate and the bitrate graph ? the bitrate graph is real time ?

Thanks a lot for the answer.

best regards,
Matthieu
toe_cutter
Cacti User
Posts: 168
Joined: Fri Sep 12, 2008 2:41 am
Location: Sweden

Re: Cisco Router - Class Map statistics

Post by toe_cutter »

mcolas wrote:Hello,

For me the script in perl works very fine but I would like know 2 things.
What's the difference between the Pre class and the post class.
Pre class is before the packet has been classified by QoS.
Post class is after its been classified.
What's the difference between the 5min average bitrate and the bitrate graph ? the bitrate graph is real time ?
I havent seen the perl templates but im pretty sure they are the same, try them out. If there is a difference look at the data/graph templates and see how the differ.
Cacti can never be real time, only very close to real time. IIRC Cacti can only be set as low as 1min polling, which isnt done very often as there is a bunch of configuration to do.
Thanks a lot for the answer.

best regards,
Matthieu
No problem!
mcolas
Posts: 25
Joined: Fri Jan 30, 2009 4:46 am
Location: Bruxelles, Belguim

Re: Cisco Router - Class Map statistics

Post by mcolas »

Thx a lot toe_cutter for the answer.
it help me a lot :)

Matthieu
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest