CBWFQ stats collector for Cisco

Addons for Cacti and discussion about those addons

Moderators: Developers, Moderators

wmelick
Posts: 34
Joined: Fri Apr 11, 2003 4:11 pm
Location: Wilmington, Delaware

Post by wmelick »

I am seeing an incorrect value returned by the qospol.pl script:

#./qospol.pl <host_IP> <comm> 2 get QoSdropperclass 27729.27731
this
#

I know the last two numbers are correct for the interface and the class type (an snmpwalk of 1.3.6.1.4.1.9.9.166.1.15.1.1.14.27729 produces correct values).

It seems the perl script is not parsing the output correctly and returning the string "this" instead of a numerical value?

I have tried changing the "print $ifpol1[13]" to 18 or other values with no luck.

Help? Thx.
wmelick
Posts: 34
Joined: Fri Apr 11, 2003 4:11 pm
Location: Wilmington, Delaware

Somewhat working now

Post by wmelick »

Meh...I don't know what I was chasing before, but the perl code does indeed work. After stripping out all the variables, I find that it returns good data after all.

One little change I made was to use the 32-bit OID for drops instead of the 64-bit so it'll work with older routers.

But back to the drops per class issue:

For some reason Cacti doesn't put the dropped packets data into a graph correctly *if* Data Source Type is set to type COUNTER in the Data Template. I get zero values for current/ave/max with strange spikes in the millions scale on the graph.

However if I change the Data Source Type to GAUGE, and re-create the graphs, I at least get the same drop per class values in Cacti/RRD as reported by the snmpget. However this value is continually increasing as far as I can tell so the graph isn't really useful. I'll have to see if a clear counters resets this.

Anyone had any success with the Data Source Type set to COUNTER?

Thanks.
Dinfree
Posts: 13
Joined: Wed May 24, 2006 9:20 am

Post by Dinfree »

Hello,

First of all, sorry for my poor english because I'm french.

I tested these templates for QOS statistics with a cisco router and this is a success. I obtain tree graphs witch represent tree differents COS. Really, I think that is a great job!

But i have a remark. is it possible to have a representation of tree COS (tree classes of the QOS) in the same graph ? It is necessary to have tree differents data source of course ! Thanks for your answers.

Fred
himohit
Posts: 11
Joined: Fri Jun 30, 2006 8:59 am

Post by himohit »

Hi wmelick,
I tried your suggestion by changing the Counter to Guage in the Data Type for QoS drops but i still get some weird values. Its not in million any more but it still is in k, which is till not right.
Have you had any success with the QoS drops for each class. Please let me know. Thanks in advance,
Mo
heckler40
Posts: 21
Joined: Mon Oct 02, 2006 5:36 pm
Location: bash

Post by heckler40 »

I'm getting the same issues for the drops. Any updates?
heckler40
Posts: 21
Joined: Mon Oct 02, 2006 5:36 pm
Location: bash

Post by heckler40 »

One thing I noticed is the graph template base value is "1000". I am assuming this is one of the problems for the elevated values. I think the base value should be 1???

When I do set it to one, I get this after clearing the poller cache:

10/09/2006 02:15:02 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "select snmp_query_graph_rrd.snmp_field_name, data_template_rrd.id as data_template_rrd_id from (snmp_query_graph_rrd,data_template_rrd) where snmp_query_graph_rrd.data_template_rrd_id=data_template_rrd.local_data_template_rrd_id and snmp_query_graph_rrd.snmp_query_graph_id= and snmp_query_graph_rrd.data_template_id=55 and data_template_rrd.local_data_id=43"

If I set it back to 1000, it comes back ok.
heckler40
Posts: 21
Joined: Mon Oct 02, 2006 5:36 pm
Location: bash

Post by heckler40 »

Ok...I believe that the base value should be at 1000. But, I think the script is polling the wrong OID. FYI, I'm on a 7200 running 12.4x.

I will take a look at this later and post some info.
heckler40
Posts: 21
Joined: Mon Oct 02, 2006 5:36 pm
Location: bash

Post by heckler40 »

Ok...here is what I have:

I agree with an above comment that there is something not being processed correctly by Cacti.

I generated drops in a default class, and the diff between the previous and current value is 21.

Code: Select all

previous:
Class-map: class-default (match-any)
      471384523 packets, 137315715249 bytes
      30 second offered rate 37000 bps, drop rate 0 bps
      Match: any 
      Queueing
        Flow Based Fair Queueing
        Maximum Number of Hashed Queues 256 
        (total queued/total drops/no-buffer drops) 0/24768/0

current:
 Class-map: class-default (match-any)
      471386211 packets, 137316282896 bytes
      30 second offered rate 76000 bps, drop rate 8000 bps
      Match: any 
      Queueing
        Flow Based Fair Queueing
        Maximum Number of Hashed Queues 256 
        (total queued/total drops/no-buffer drops) 0/24789/0
I also ran the qos script before and after to verfiy the rate of change is correct.

Code: Select all

previous: debtest:~# /usr/share/cacti/site/scripts/qospol.pl x.x.x.x public 2 get QoSdropperclass 80.class-default
25349
current: debtest:~# /usr/share/cacti/site/scripts/qospol.pl x.x.x.x public 2 get QoSdropperclass 80.class-default
25370
As you can see from the above, the router change of drops in the default class matches what the perl script gets.

The resultant graph shows 0.

So what gives? Would a dev mind looking at this? Does anyone have any working examples of a simple COUNTER setup with something like this???
heckler40
Posts: 21
Joined: Mon Oct 02, 2006 5:36 pm
Location: bash

Post by heckler40 »

Would anyone mind helping me debug the drops?

My graph shows VERY small numbers (1 or 2 drops) when I know there are MANY. I am trying to get the "change" not the total numbers.

So, here is what I have so far:

rrdtool fetch /var/lib/cacti/rra/xyz.rrd LAST

1162224300: 4.6201550388e-02
1162224600: 2.0331337015e-02
1162224900: 1.3377926421e-04
1162225200: 0.0000000000e+00
1162225500: 0.0000000000e+00
1162225800: 0.0000000000e+00
1162226100: 0.0000000000e+00
1162226400: 0.0000000000e+00

Then, I copy and paste the actual poller command used:

/usr/bin/perl /usr/share/cacti/site/scripts/qospol.pl x.x.x.x public 2 get qosstuff.class-default
58513

Which is what the router shows:
(total queued/total drops/no-buffer drops) 24/58513/0

Any ideas?
User avatar
Instigater
Cacti User
Posts: 141
Joined: Mon Dec 13, 2004 5:14 pm
Location: Jurmala, Latvia

Post by Instigater »

I have noticed one bug.
We have configured symetric bandwidth limit. The same class map is shared for input and output, only difference is in direction parameter. This script asumes that class map is used only once per interface that's why we can monitor only one direction.
This sux, I'm trying to make my own script but cisco SNMP agent is a b***. Could someone with a good perl knowledge improve this script?
shiva_ial
Posts: 1
Joined: Sat Mar 24, 2007 4:08 am

anybody help on installing cacti on windows xp

Post by shiva_ial »

anybody to help me how to install cacti and montior class based qos monitoring from cisco router
it would be helpful if u provide in steps
what all things to done .
kenchie
Posts: 18
Joined: Sat Apr 14, 2007 5:43 am
Location: Singapore
Contact:

QOS

Post by kenchie »

Hi Guys,

I tried importing the files and everything to be fine. I also change permission of qos.xml and qos.pl but when i created a graph, it shows like the one on the screenshot. Also attached is the screenshot when i run debug mode.

Any help would be greatly appreciated.

Thanks and regards.

Melvin
Attachments
Screenshot.png
Screenshot.png (192.55 KiB) Viewed 15830 times
Screenshot-1.png
Screenshot-1.png (177.59 KiB) Viewed 15830 times
mikenipp
Posts: 5
Joined: Mon Dec 22, 2003 7:42 pm
Location: Boise, ID
Contact:

Post by mikenipp »

kenchie,
I ran into this same issue. A couple things to try. A lot of the scripts posted on this message board need to be modified to suite your system.

If you execute the following command as a test via command line you are probably getting no output.

Code: Select all

perl qospol.pl 10.152.96.65 bmhcpub 1 get Qosdropperclass 80.class-default
Look at the qospol.pl file. Check that the paths to snmpwalk and snmpget point to where they reside on your machine. For instance, mine are in /usr/local/bin not /usr/bin. You need to replace these paths.

Code: Select all

#getting dropsper class
        if ($cmd eq 'get' && $cmd1 eq 'QoSdropperclass') {
        cindex($get_ix);
        my($classdrop) = `/usr/local/bin/snmpget -Os -c  $community -v $snmpv $node 1.3.6.1.4.1.9.9.166.1.15.1.1.14.$sindex1.$sindex2`;
        $classdrop =~ s/ /./g;
        chomp($classdrop);
        my(@ifpol1) = split(/\./,$classdrop);
        print $ifpol1[13] . "\n";
        }
Also, I had to remove the "c" from all the snmpget and snmpwalk statements. I am using snmp version 1. When you try to execute the script with a "1" it will fail because it puts in a 1c. You will get an error like

Code: Select all

Invalid version specified after -v flag: 1c
Hope this helps a little.
echelon360
Posts: 24
Joined: Tue Mar 28, 2006 2:40 am

Does it work on windows

Post by echelon360 »

I imported the templates and can't get anything after the associated queries.
Does it work in windows?
massimo
Posts: 5
Joined: Tue Dec 18, 2007 10:10 am

Post by massimo »

heckler40 wrote:

Code: Select all

previous:
Class-map: class-default (match-any)
      471384523 packets, 137315715249 bytes
      30 second offered rate 37000 bps, drop rate 0 bps
      Match: any 
      Queueing
        Flow Based Fair Queueing
        Maximum Number of Hashed Queues 256 
        (total queued/total drops/no-buffer drops) 0/24768/0

current:
 Class-map: class-default (match-any)
      471386211 packets, 137316282896 bytes
      30 second offered rate 76000 bps, drop rate 8000 bps
      Match: any 
      Queueing
        Flow Based Fair Queueing
        Maximum Number of Hashed Queues 256 
        (total queued/total drops/no-buffer drops) 0/24789/0
I've been looking for the packets/bytes values (e.g., 471386211 packets, 137316282896 bytes) oids for a while now - with no success. Can anybody help me pointing out the oids for these values?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests