Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sun May 28, 2017 11:41 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 45 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject: Re: Cisco Router - Class Map statistics
PostPosted: Sun Jan 09, 2011 6:25 am 
Offline

Joined: Mon Mar 11, 2002 7:00 pm
Posts: 45
Greetings,

Does someone have an export from 0.8.7g available that could be attached...? I'm getting XML Parse error when trying to import the cacti_data_query_cisco_router_-_cm_stats.xml file.

Thank you,
/Jesper


Top
 Profile  
 
 Post subject: Re: Cisco Router - Class Map statistics
PostPosted: Wed Jan 12, 2011 6:36 pm 
Offline
User avatar

Joined: Thu Nov 06, 2008 1:03 pm
Posts: 17
Location: Orem, Utah
Hey Guys, I wonder if any of you still hang around here? I just 1 thing I am trying to figure out with this. I am pulling QOS info from a number of routers, my pre-class and post-class look fine. But my drop rate always stays at 0 even though I know its not. Any ideas?


Attachments:
screen-capture-8.png
screen-capture-8.png [ 33.44 KiB | Viewed 4530 times ]

_________________
“Sometimes the questions are complicated and the answers are simple.” - Dr. Suess

- Matthew Schwen
Network Engineer
Adobe Systems
Top
 Profile  
 
 Post subject: Re: Cisco Router - Class Map statistics
PostPosted: Sat Jan 15, 2011 8:15 am 
Offline
Cacti User

Joined: Fri Sep 12, 2008 2:41 am
Posts: 168
Location: Sweden
mschwen wrote:
Hey Guys, I wonder if any of you still hang around here? I just 1 thing I am trying to figure out with this. I am pulling QOS info from a number of routers, my pre-class and post-class look fine. But my drop rate always stays at 0 even though I know its not. Any ideas?

I have to check at work on monday, but what if you snmpwalk the droprate-oid and see what you get? It could also be that the oid has changed, i sortof remember something about that, but again, i have to check at work.


Top
 Profile  
 
 Post subject: Re: Cisco Router - Class Map statistics
PostPosted: Mon Jan 24, 2011 9:12 am 
Offline

Joined: Tue Jun 20, 2006 12:49 pm
Posts: 30
What version is this export for? Anyone have one for 0.8.7c? Very nice work on this.

Thanks,
Bidzer


Top
 Profile  
 
 Post subject: Re: Cisco Router - Class Map statistics
PostPosted: Sat Feb 19, 2011 2:56 pm 
Offline
Cacti User

Joined: Mon May 03, 2010 11:48 am
Posts: 71
Hello,

I hav einstalled the php version of the script. I'm running about 100 routers with differnt QOS Policy Maps configured, so I activated the CM data query on them and got about 1000 more data sources and lot of new rrd files.

Afterwards I got lots of similar error messages in my logfile:

Quote:
Poller[0] ERROR: SS[0] PHP Script Server communications lost. Restarting PHP Script Server
[0] ERROR: Input Expected, Script Server Terminating


and the overall php script server increased drammatically as you can see here:
Attachment:
poller_items.png
poller_items.png [ 18.78 KiB | Viewed 4437 times ]

and here the object image:
Attachment:
poller_objects.png
poller_objects.png [ 22.19 KiB | Viewed 4437 times ]


afterwards I have deleted on some hosts the data query as I got loads of before declared errors, also the overall query time increased as you can see here:
Attachment:
runtime.png
runtime.png [ 22.1 KiB | Viewed 4437 times ]


Question:
1. Why do I have so much more SCRIPT SERVER now?
2. Why is the overall stats time so much increased?
3. Is there a chance to optimize things for me or does someone know a better script to graph Cisco CBWFQ?

this is my cacti instance technical info:
Quote:
Technical Support
General Information
Date Sat, 19 Feb 2011 20:56:25 +0100
Cacti Version 0.8.7g
Cacti OS unix
SNMP Version NET-SNMP version: 5.4.2.1
RRDTool Version RRDTool 1.3.x
Hosts 718
Graphs 2137
Data Sources : 1
Script/Command: 112
SNMP: 27
SNMP Query: 1768
Script Query: 24
Script - Script Server (PHP): 4
Script Query - Script Server: 202
Total: 2138
Poller Information
Interval 60
Type spine
Items Action[0]: 3433
Action[1]: 112
Action[2]: 607
Total: 4152
Concurrent Processes 1
Max Threads 50
PHP Servers 7
Script Timeout 25
Max OID 10

Thanks for any help!

_________________
_________________
Cacti - 0.8.8c
Poller Type - SPINE 0.8.7i
Server Info - Linux 2.6.31.14 - Opensuse 11
Web Server - Apache/2.2.13 PHP 5.3.3
MySQL - 5.1.49 ;RRDTool - 1.3.7 ;SNMP - 5.4.2.1


Top
 Profile  
 
 Post subject: Re: Cisco Router - Class Map statistics
PostPosted: Sat Feb 19, 2011 3:37 pm 
Offline
Cacti User

Joined: Fri Sep 12, 2008 2:41 am
Posts: 168
Location: Sweden
hmorandell wrote:
I hav einstalled the php version of the script. I'm running about 100 routers with differnt QOS Policy Maps configured, so I activated the CM data query on them and got about 1000 more data sources and lot of new rrd files.

Question:
1. Why do I have so much more SCRIPT SERVER now?
2. Why is the overall stats time so much increased?
3. Is there a chance to optimize things for me or does someone know a better script to graph Cisco CBWFQ?

1. Since you created cbwfq-graphs for all your hosts, and, i assume for all your policy-maps. These data sources uses the script server, and thus your script server objects increase.
2. The script has to be called once for every data source. And script server is the fastest there is next to regular snmp, but still alot slower. This is only logical, you add a bunch of script-server data sources to be run, the poll takes longer.
3. Im sure there is room for optimizations of the script, but i dont have the time currently to look over it.

A tip is to not create cbwfq graphs for every host/policy-map, but to use it on important devices, or as a faultsearching tool.


Top
 Profile  
 
 Post subject: Re: Cisco Router - Class Map statistics
PostPosted: Sun Feb 20, 2011 4:45 am 
Offline
Cacti User

Joined: Mon May 03, 2010 11:48 am
Posts: 71
toe_cutter wrote:
hmorandell wrote:
I hav einstalled the php version of the script. I'm running about 100 routers with differnt QOS Policy Maps configured, so I activated the CM data query on them and got about 1000 more data sources and lot of new rrd files.

Question:
1. Why do I have so much more SCRIPT SERVER now?
2. Why is the overall stats time so much increased?
3. Is there a chance to optimize things for me or does someone know a better script to graph Cisco CBWFQ?

1. Since you created cbwfq-graphs for all your hosts, and, i assume for all your policy-maps. These data sources uses the script server, and thus your script server objects increase.
2. The script has to be called once for every data source. And script server is the fastest there is next to regular snmp, but still alot slower. This is only logical, you add a bunch of script-server data sources to be run, the poll takes longer.
3. Im sure there is room for optimizations of the script, but i dont have the time currently to look over it.

A tip is to not create cbwfq graphs for every host/policy-map, but to use it on important devices, or as a faultsearching tool.


thx for your quick response. I understand that it should be possible moving the script to snmp queries instead of using the php file? Will this be hard to realize, do you recommend using your 3 files as a starting point or starting from something else?
Is there any easy way to do this, or do you think this will only take to much time?

I really like the graphs your script creates, the most i need to know is if I have drops on some of my classes!

Thx for this great share!

_________________
_________________
Cacti - 0.8.8c
Poller Type - SPINE 0.8.7i
Server Info - Linux 2.6.31.14 - Opensuse 11
Web Server - Apache/2.2.13 PHP 5.3.3
MySQL - 5.1.49 ;RRDTool - 1.3.7 ;SNMP - 5.4.2.1


Top
 Profile  
 
 Post subject: Re: Cisco Router - Class Map statistics
PostPosted: Sun Feb 20, 2011 6:21 am 
Offline
Cacti User

Joined: Fri Sep 12, 2008 2:41 am
Posts: 168
Location: Sweden
hmorandell wrote:
thx for your quick response. I understand that it should be possible moving the script to snmp queries instead of using the php file? Will this be hard to realize, do you recommend using your 3 files as a starting point or starting from something else?
Is there any easy way to do this, or do you think this will only take to much time?

I really like the graphs your script creates, the most i need to know is if I have drops on some of my classes!

Thx for this great share!

If it were possible to do this via regular snmp queries (indexed) it would probably have been done already, ill have another look at it during next week tho.
What you can do, since you only need drops is to edit the data template and graph template to only include the drops. You might have to edit the data query aswell. This will cut down the amount of data sources that is run.

:) your welcome


Top
 Profile  
 
 Post subject: Re: Cisco Router - Class Map statistics
PostPosted: Sun Feb 20, 2011 10:56 am 
Offline
Cacti User

Joined: Mon May 03, 2010 11:48 am
Posts: 71
@toe_cutter: do you think that there will be no chance to use snmp queries instead of php script server? What could be the problem? Is it not only a similar query then using the standard interface snmp query?

I really appreciate your work.

_________________
_________________
Cacti - 0.8.8c
Poller Type - SPINE 0.8.7i
Server Info - Linux 2.6.31.14 - Opensuse 11
Web Server - Apache/2.2.13 PHP 5.3.3
MySQL - 5.1.49 ;RRDTool - 1.3.7 ;SNMP - 5.4.2.1


Top
 Profile  
 
 Post subject: Re: Cisco Router - Class Map statistics
PostPosted: Mon Feb 21, 2011 5:56 am 
Offline
Cacti User

Joined: Mon May 03, 2010 11:48 am
Posts: 71
Sorry to say that,

but this is pretty useless: as soon as there is lots of traffic on the routers and the different QOS classes, the script keeps going in timeout and all the cacti spine processes go in blocking so that on all graphs you get data losses.

I had to reduce this script now to 3 routers and suggest to everyone to use it only for debbuging purposes only and not for daily use!

_________________
_________________
Cacti - 0.8.8c
Poller Type - SPINE 0.8.7i
Server Info - Linux 2.6.31.14 - Opensuse 11
Web Server - Apache/2.2.13 PHP 5.3.3
MySQL - 5.1.49 ;RRDTool - 1.3.7 ;SNMP - 5.4.2.1


Top
 Profile  
 
 Post subject: Re:
PostPosted: Sat Oct 15, 2011 9:04 am 
Offline

Joined: Sat Oct 15, 2011 3:02 am
Posts: 2
Vade wrote:
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:

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!





This worked for me but with a different value so it is the fix for -nan values, you will need to work out what number works for you with snmpwalk, mine was 11


Top
 Profile  
 
 Post subject: Re:
PostPosted: Thu Feb 09, 2012 6:22 am 
Offline

Joined: Thu Feb 09, 2012 5:34 am
Posts: 2
toe_cutter wrote:
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:
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:
[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. :)

Hi!
I have update this script
"get" function is simplified ,also resolved bug with empty outbound data on cisco2800
changes only inside ss_qospol.php,

tested on Cisco 2821 Cisco 3845
i will appreciate for any feedback.


Attachments:
File comment: follow instructions at http://forums.cacti.net/viewtopic.php?p=176111#p176111, and rename ss_qospol.php_09022012_linvinus.txt to ss_qospol.php
ss_qospol.php_09022012_linvinus.txt [16.64 KiB]
Downloaded 480 times
Top
 Profile  
 
 Post subject: Re: Cisco Router - Class Map statistics
PostPosted: Fri Sep 28, 2012 12:23 am 
Offline

Joined: Wed Sep 19, 2012 11:20 pm
Posts: 1
Dear All,

I have tried to use that template, it is very useful and helpful. But I got with other issue cause it could not query the class from port-channel. Is there anyway to solve this problem?

Cacti Version 0.8.7e

Thanks in advance for support and help,

Veasna


Top
 Profile  
 
 Post subject: Re: Cisco Router - Class Map statistics
PostPosted: Wed Jan 11, 2017 11:09 pm 
Offline

Joined: Fri Aug 08, 2014 3:38 am
Posts: 20
Dear All,

Any 64bit counter template update for this pls?


Last edited by Sophanith on Thu Jan 19, 2017 10:41 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Cisco Router - Class Map statistics
PostPosted: Fri Jan 13, 2017 3:56 am 
Offline

Joined: Fri Aug 08, 2014 3:38 am
Posts: 20
Hi All,

Can anyone share and updated scripts with 64 bits encounter?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 45 posts ]  Go to page Previous  1, 2, 3

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