Cisco CBWFQ monitoring

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

Moderators: Developers, Moderators

Post Reply
pwozney
Posts: 32
Joined: Thu Dec 16, 2004 3:14 pm

Cisco CBWFQ monitoring

Post by pwozney »

I use QoS on some WAN connections and I am currently using cacti to monitor the bandwidth consumed by each class.

I've posted this in another thread that is in the Feature Request forum, but since it's working now :) I figured this is a good place to start a new discussion.

The system is based on a perl script written by Andy Brauer back in 2002. I have completely rewritten the script to report in cacti standard formatting. The perl script was written on linux, and requires snmpwalk. If you run this on another operating system, or with a different version of snmp you may have to tweak it.



I'll try to help you as I can, but feel free to modify the script to your own purposes.
Attachments
cbwfq.0.53.pl.txt
(6.21 KiB) Downloaded 7257 times
cacti_data_query_cisco_get_cbwfq_classes.xml
(13.23 KiB) Downloaded 6529 times
cacti_data_template_cbwfq_throughput.xml
(4.33 KiB) Downloaded 6704 times
pwozney
Posts: 32
Joined: Thu Dec 16, 2004 3:14 pm

Post by pwozney »

The last xml file.
Attachments
cacti_host_template_cisco_router.xml
(130.24 KiB) Downloaded 5701 times
pwozney
Posts: 32
Joined: Thu Dec 16, 2004 3:14 pm

Post by pwozney »

Whoops forgot one.
Attachments
cacti_graph_template_cisco_bits_output_from_qos_class.xml
(11.73 KiB) Downloaded 5813 times
budhal2003
Posts: 6
Joined: Mon May 02, 2005 1:48 pm

Post by budhal2003 »

pwozney wrote:Whoops forgot one.

I already import all the script and copy cbwfq.xml to <path_cacti>/resource/script_queries/cbwfq.xml, but it's still come an error in Console -> Data Queries -> (Edit) -> Associated Graph Templates

Warning: Variable passed to each() is not an array or object in /var/www/localhost/htdocs/cacti/data_queries.php on line 312

Could you please give me a hand.
iceman123
Posts: 10
Joined: Wed May 04, 2005 8:01 pm

Post by iceman123 »

has anyone gotten this to work..? if so, where to import these files and the perl script..
LeonT
Posts: 8
Joined: Mon May 09, 2005 2:12 am

Post by LeonT »

budhal2003 wrote:
pwozney wrote:Whoops forgot one.

I already import all the script and copy cbwfq.xml to <path_cacti>/resource/script_queries/cbwfq.xml, but it's still come an error in Console -> Data Queries -> (Edit) -> Associated Graph Templates

Warning: Variable passed to each() is not an array or object in /var/www/localhost/htdocs/cacti/data_queries.php on line 312

Could you please give me a hand.
Where did you get the cbwfq.xml file from? Did you rename the perl file? If so, I think that one should be a seperate file and be referenced to from the cbwfq.xml file.

On a sidenote, I haven't managed to get it to work either. I would appreciate it if the topicstarter could post all the files he currently uses in a zip file or something.
Sorry to be such a hassle ;)
budhal2003
Posts: 6
Joined: Mon May 02, 2005 1:48 pm

Post by budhal2003 »

Yes Leon, apparently I did rename the perl file to be used as xml :)
So there should be 2 different files of pl and xml, does anybody know where can I get this particular xml file? thx a lot :D
nonolk
Posts: 4
Joined: Thu May 12, 2005 6:35 am

Post by nonolk »

Did someone manage to make it working ??
I think we have to make your own cbwfq.xml, but I don't know how, and maybe I'm wrong. So if someone could help us, I would be nice.

Thank's In advance.

--
Nonolk.
pwozney
Posts: 32
Joined: Thu Dec 16, 2004 3:14 pm

Post by pwozney »

Ahh feh. I forgot to post cbwfq.xml - quite possibly the part I had the most trouble with myself. :) In my defense the cacti front end does not include this critical xml file in it's export function, and that's why I forgot it.

Here are the files in a zip file, as requested.

The perl script goes here:
cacti/scripts/cbwfq.pl

I created a symbolic link - I've added that in the zip as well but I'm sure you can do that yourselves, or just rename the cbwfq.0.53.pl to cbwfq.pl.

The script xml file goes here:
cacti/resource/script_queries/cbwfq.xml

Everything else you can import into cacti through the frontend. Thanks for spotting this Leon!
Attachments
cbwfq4cacti.zip
(24.82 KiB) Downloaded 8579 times
nonolk
Posts: 4
Joined: Thu May 12, 2005 6:35 am

Post by nonolk »

Thak's a lot for your help.

--
Nonolk.
ShadowPhax
Posts: 10
Joined: Wed Mar 30, 2005 3:57 am

Post by ShadowPhax »

hi

the imports work wonderful, but what about the .pl script. I'm new to cacti so i would assume it needs to create a data input method ? If its supposed to am i to create it myself ?

thanks
ShadowPhax
pwozney
Posts: 32
Joined: Thu Dec 16, 2004 3:14 pm

Post by pwozney »

You're right, you do need a data input method. It's not exportable by cacti, so I've saved a screenshot of mine.

The input string is hidden on the screenshot - so use this:

<path_cacti>/scripts/cbwfq.pl <ip> <community> get <class>
Attachments
cbwfq data input method.jpg
cbwfq data input method.jpg (61.34 KiB) Viewed 85757 times
nonolk
Posts: 4
Joined: Thu May 12, 2005 6:35 am

Post by nonolk »

Hi,

I have a little problem to mkae this working, now for cacti everything seems to fine, exept that data collected by the cbxfq.pl.
What I don't understand is with your old script I get 4 classes with bytes. But with the newer one I have nothing.
Could you help me please ??

Any help will be greatly appreciated.

--
Nonolk.
LeonT
Posts: 8
Joined: Mon May 09, 2005 2:12 am

Post by LeonT »

pwozney - Thanks alot. I managed to get it working thanks to your help.
I had to change some variables and calling options in the .pl file because of the version of netsnmp I am using (win32 ) but that was done without problems.
In combination with Weathermap this really is a great addition. Thumbs up for you.

nonol - did you change the filterstrings in the .pl file? Otherwise please tell us what setup you are using.
nonolk
Posts: 4
Joined: Thu May 12, 2005 6:35 am

Post by nonolk »

I'm using debian testing (sarge) with stock kernel. My version of snmp utils is 5.1.2. I don't change the filter because I don't know what to change, the filter says "QoS" and it's what I want to monitor.

Thank's for your help

Update : I change the filter to ".*" and now I can get my 4 Qos class, so I can create graph, but there is still a problem, I can't get any values, so the graph are empty. I'm sorry I'm a little bit tirred.


And here is the debug output from cmd.php

Code: Select all

05/13/2005 02:56:09 PM - CMDPHP: Poller[0] Host[2] RECACHE: Processing 2 items in the auto reindex cache for '10.104.17.1'.
05/13/2005 02:56:10 PM - CMDPHP: Poller[0] Host[2] WARNING: Result from CMD not valid.  Partial Result: usage:

./nmiscbwfq.
05/13/2005 02:56:10 PM - CMDPHP: Poller[0] Host[2] CMD: /usr/share/cacti/site/scripts/cbwfq.pl  private get class-default, output: U

Thank's again.

--
Nonolk.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests