Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Mon Nov 19, 2018 12:05 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 45 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Cisco Router - Class Map statistics
PostPosted: Thu Nov 16, 2006 5:41 am 
Offline
Cacti User
User avatar

Joined: Mon Dec 13, 2004 5:14 pm
Posts: 141
Location: Jurmala, Latvia
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.


Attachments:
teaser02.jpg
teaser02.jpg [ 62.09 KiB | Viewed 62729 times ]
teaser01.jpg
teaser01.jpg [ 30.77 KiB | Viewed 62729 times ]
File comment: Data query and graph template. For testing purposes only!
cacti_data_query_cisco_router_cm_stats.xml.tar.gz [4.24 KiB]
Downloaded 4566 times
File comment: Script and XML file
CM_stats.tar.gz [2.44 KiB]
Downloaded 4413 times
Top
 Profile  
 
 Post subject: nan graphs
PostPosted: Thu Jan 04, 2007 12:38 pm 
Offline

Joined: Thu Dec 28, 2006 3:48 pm
Posts: 5
Location: Dalla, TX
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


Top
 Profile  
 
 Post subject: CBWFQ
PostPosted: Wed Feb 14, 2007 3:52 pm 
Offline

Joined: Wed Jan 24, 2007 11:18 am
Posts: 3
Excellent Template/Script!!
The only problem is that with some routers it takes more than 5 minutes to discover. Is there any way could add a cache option and re-discover only when needed?
Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 12, 2007 8:05 pm 
Offline

Joined: Tue Jan 17, 2006 11:24 pm
Posts: 15
any update on this?

i my graphs display "nan"


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 12, 2007 10:35 pm 
Offline

Joined: Tue Jan 17, 2006 11:24 pm
Posts: 15
i ended up using "moonshines" script


Top
 Profile  
 
 Post subject: Re: Cisco Router - Class Map statistics
PostPosted: Tue Mar 13, 2007 5:04 am 
Offline

Joined: Wed May 24, 2006 8:00 am
Posts: 2
which version of Perl or.. which packages of Perl must be installed..?
When I load this script, it doens't return any values..


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 28, 2007 3:21 pm 
Offline
Cacti User

Joined: Mon Jul 18, 2005 7:01 pm
Posts: 60
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


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 19, 2007 5:25 am 
Offline
Cacti User

Joined: Sat Jan 22, 2005 4:51 pm
Posts: 82
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' ....


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 15, 2008 3:32 pm 
Offline

Joined: Fri Nov 09, 2007 3:54 pm
Posts: 10
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.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 15, 2008 7:31 pm 
Offline

Joined: Fri Feb 15, 2008 7:29 pm
Posts: 5
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.


I got moonmans script working last night on W2k3, you just need to move $node around in the perl file.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 03, 2008 6:25 am 
Offline

Joined: Thu Apr 03, 2008 6:12 am
Posts: 1
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' ....


I know this is an old post, but I also had this problem - fixed it by replacing [18] with [13].

explanation: if you have a look at the output of your snmpwalk, you'll see it looks like:

[email protected]:~# /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!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 07, 2008 9:00 am 
Offline
Cacti User

Joined: Tue Jan 09, 2007 8:28 am
Posts: 206
Location: London, UK
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??


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 05, 2008 4:07 am 
Offline

Joined: Tue May 27, 2008 2:45 am
Posts: 14
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?


Top
 Profile  
 
 Post subject: Updated Version of qospol.pl
PostPosted: Wed Sep 03, 2008 3:22 pm 
Offline

Joined: Tue Jan 22, 2008 4:04 pm
Posts: 5
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


Attachments:
qospol.pl [7.06 KiB]
Downloaded 2469 times
Top
 Profile  
 
 Post subject: Cisco Router - Class Map statistics Update 2
PostPosted: Wed Sep 03, 2008 5:08 pm 
Offline

Joined: Tue Jan 22, 2008 4:04 pm
Posts: 5
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


Attachments:
qos.xml [3.32 KiB]
Downloaded 3758 times
qospol.pl [8.28 KiB]
Downloaded 3431 times
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 45 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group