Cisco Router - Class Map statistics
Moderators: Developers, Moderators
- Instigater
- Cacti User
- Posts: 141
- Joined: Mon Dec 13, 2004 5:14 pm
- Location: Jurmala, Latvia
Cisco Router - Class Map statistics
One day I noticed Cisco CBWFQ template, it had one major problem - it did not take in account the direction of policy and showed only one direction (and you could only guess which it was). I modified script from that tamplate to fix this issue.
I won't publish complete template is not usable on standard cacti, just data query and perl script, you should be fine to make further it out. I'm using 1 minute polling interval on my system.
Put qos.xml in resource/script_queries folder and qospol.pl in scripts folder.
I won't publish complete template is not usable on standard cacti, just data query and perl script, you should be fine to make further it out. I'm using 1 minute polling interval on my system.
Put qos.xml in resource/script_queries folder and qospol.pl in scripts folder.
- Attachments
-
- CM_stats.tar.gz
- Script and XML file
- (2.44 KiB) Downloaded 6555 times
-
- cacti_data_query_cisco_router_cm_stats.xml.tar.gz
- Data query and graph template. For testing purposes only!
- (4.24 KiB) Downloaded 6710 times
-
- teaser01.jpg (30.77 KiB) Viewed 68738 times
-
- teaser02.jpg (62.09 KiB) Viewed 68738 times
nan graphs
Instigater
Thanks for the CBWFQ template. I am having a problem where it looks like everything is installed correctly but my graphs are just showing "nan". If I run snmpwalk I can see that all of the needed OID's are there but I am collecting any data. Any thoughts?
Thanks,
Shuyun
PS. To add to this I have tried running the script from the command line...
./qospol.pl somerouterip somecommunity 2 get QoSbitrate 22
and this is what I get...
Use of uninitialized value in string eq at ./qospol.pl line 257.
Use of uninitialized value in string eq at ./qospol.pl line 257.
Use of uninitialized value in string eq at ./qospol.pl line 257.
this
Not sure if this is the right way to enter it from the command line.
Thanks,
Shuyun
Thanks for the CBWFQ template. I am having a problem where it looks like everything is installed correctly but my graphs are just showing "nan". If I run snmpwalk I can see that all of the needed OID's are there but I am collecting any data. Any thoughts?
Thanks,
Shuyun
PS. To add to this I have tried running the script from the command line...
./qospol.pl somerouterip somecommunity 2 get QoSbitrate 22
and this is what I get...
Use of uninitialized value in string eq at ./qospol.pl line 257.
Use of uninitialized value in string eq at ./qospol.pl line 257.
Use of uninitialized value in string eq at ./qospol.pl line 257.
this
Not sure if this is the right way to enter it from the command line.
Thanks,
Shuyun
-
- Posts: 2
- Joined: Wed May 24, 2006 8:00 am
Re: Cisco Router - Class Map statistics
which version of Perl or.. which packages of Perl must be installed..?
When I load this script, it doens't return any values..
When I load this script, it doens't return any values..
-
- Cacti User
- Posts: 60
- Joined: Mon Jul 18, 2005 7:01 pm
I too only get Nan for my graphs and also get uninitialized values when I try to run it from the command line. I am hoping someone here knows why this is happening. If anyone has this working or if anyone knows why this is being problematic please let us know.
I had used other cbwfq graphs before and this one looks like the most progressive and certainly the best looking. I am hoping to make this work but I know nothing of PERL or PHP so this may be slow going. If anyone knows what might be wrong i would be happy to help test your theories.
thanks
I had used other cbwfq graphs before and this one looks like the most progressive and certainly the best looking. I am hoping to make this work but I know nothing of PERL or PHP so this may be slow going. If anyone knows what might be wrong i would be happy to help test your theories.
thanks
-
- Cacti User
- Posts: 85
- Joined: Sat Jan 22, 2005 4:51 pm
I'm also experiencing the error
Use of uninitialized value in concatenation
Watching the errors and qospol.pl file, seems that ALL errors are regarding the lines that print the variable index value number 18, just like:
print $cbitr[18] . "\n";
print $precbitr[18] . "\n";
print $dropbitr[18] . "\n";
This command, printing the variable index number 18, happens several times on qospol.pl and seems it's the one that is generating the error.
I can successfully do the snmpwalk commands and can see values .... but nothing is returned from the qospol.pl script but the 'unitialized value in concatenation' ....
Use of uninitialized value in concatenation
Watching the errors and qospol.pl file, seems that ALL errors are regarding the lines that print the variable index value number 18, just like:
print $cbitr[18] . "\n";
print $precbitr[18] . "\n";
print $dropbitr[18] . "\n";
This command, printing the variable index number 18, happens several times on qospol.pl and seems it's the one that is generating the error.
I can successfully do the snmpwalk commands and can see values .... but nothing is returned from the qospol.pl script but the 'unitialized value in concatenation' ....
I know this is an old post, but I also had this problem - fixed it by replacing [18] with [13].leonardo_gyn wrote:I'm also experiencing the error
Use of uninitialized value in concatenation
Watching the errors and qospol.pl file, seems that ALL errors are regarding the lines that print the variable index value number 18, just like:
print $cbitr[18] . "\n";
print $precbitr[18] . "\n";
print $dropbitr[18] . "\n";
This command, printing the variable index number 18, happens several times on qospol.pl and seems it's the one that is generating the error.
I can successfully do the snmpwalk commands and can see values .... but nothing is returned from the qospol.pl script but the 'unitialized value in concatenation' ....
explanation: if you have a look at the output of your snmpwalk, you'll see it looks like:
root@test:~# /usr/local/bin/snmpget -Os -c <your comm string> -v 2c <your ip> 1.3.6.1.4.1.9.9.166.1.15.1.1.11.691199.691201
enterprises.9.9.166.1.15.1.1.11.691199.691201 = Gauge32: 7340000
after the snmp command is run in the qospol.pl script, you'll see it performs a "=~ s/ /./g", which means substitute spaces with periods ( . ). There are only 3 spaces in the output of the snmpget command - before and after the "=" and after the "Gauge32:". The resulting string is then:
enterprises.9.9.166.1.15.1.1.11.691199.691201.=.Gauge32:.7340000
so then it considers periods ( . ) as deliminators, and [18] means print the 18th field, which clearly doesn't exist (hence the NaN). Counting the fields (inbetween periods ) in the above string shows that the value you are after is actually field 13
hope it helps! it did for me!
Great script....
However, I have a problem where I need to graph approximately 5 QoS classes in each direction on somewhere around 50 routers. Along with the rest of the polling, if I add all of that in then I can't hit the 300 second limit even though I'm using spine and boost....
Does anyone know if this would work quicker if converted to php to run through the script server??
However, I have a problem where I need to graph approximately 5 QoS classes in each direction on somewhere around 50 routers. Along with the rest of the polling, if I add all of that in then I can't hit the 300 second limit even though I'm using spine and boost....
Does anyone know if this would work quicker if converted to php to run through the script server??
-
- Posts: 14
- Joined: Tue May 27, 2008 2:45 am
Hi Instigater,
I am trying to run the script from the command line.But its giving the following error.
# perl qospol.pl
not enough or wrong arguments
And I came to know that the syntax is
./qospol.pl somerouterip somecommunity 2 get QoSbitrate 22
Can you please explain how to use that script.
Or can you please tel me how to setup this template?
I am trying to run the script from the command line.But its giving the following error.
# perl qospol.pl
not enough or wrong arguments
And I came to know that the syntax is
./qospol.pl somerouterip somecommunity 2 get QoSbitrate 22
Can you please explain how to use that script.
Or can you please tel me how to setup this template?
Updated Version of qospol.pl
Hello,
I have updated the qospol.pl - script, so that it work correctly with snmp output like this:
enterprises.9.9.166.1.15.1.1.10.34.7611937 = Counter64: 170243
best regards,
Erwin Herzog
I have updated the qospol.pl - script, so that it work correctly with snmp output like this:
enterprises.9.9.166.1.15.1.1.10.34.7611937 = Counter64: 170243
best regards,
Erwin Herzog
- Attachments
-
- qospol.pl
- (7.06 KiB) Downloaded 4492 times
Cisco Router - Class Map statistics Update 2
Hello once again,
Here is the next update.
At this Version you can modify the path where your SNMPWalk and SNMPGet is located.
and it is SNMP Version 1 & 2 compatible.
(Don´t forget, only the Bitrate - Counters are Version 1 compatilbe not the 64 Bit counters.)
I have also added support for cbQosCMPostPolicyByteOverflow and cbQosCMPrePolicyByteOverflow counters.
best regards
Erwin Herzog
Here is the next update.
At this Version you can modify the path where your SNMPWalk and SNMPGet is located.
and it is SNMP Version 1 & 2 compatible.
(Don´t forget, only the Bitrate - Counters are Version 1 compatilbe not the 64 Bit counters.)
I have also added support for cbQosCMPostPolicyByteOverflow and cbQosCMPrePolicyByteOverflow counters.
best regards
Erwin Herzog
Who is online
Users browsing this forum: No registered users and 4 guests