PDA

View Full Version : Total Bandwidth Calculation for Cisco Switches


consultorpc
24-03-2009, 03:19
Hello All,

We are using zabbix 1.6.2 and we have a couple of cisco switches which is monitored using SNMP. I have followed this : http://www.zabbix.com/forum/showthread.php?t=10606 , and created an .xml file. The import works great and now I would like to know how I can calculate total bandwidth for each ports on the switch? Is it possible to create a separate item to do this, to show total bandwidth usage per day, week, month and year basis?

I have read some posts in zabbix forum, and all are talking about creating graphs for this, but graphs only can show max, min and last values, how can we use this for total bandwidth calculation? Please help me to understand how I can use zabbix for total bandwidth calculation of each ports on the cisco switch.

Thanks in Advance,

consultorpc

MrKen
25-03-2009, 10:03
Hello All,

We are using zabbix 1.6.2 and we have a couple of cisco switches which is monitored using SNMP. I have followed this : http://www.zabbix.com/forum/showthread.php?t=10606 , and created an .xml file. The import works great and now I would like to know how I can calculate total bandwidth for each ports on the switch? Is it possible to create a separate item to do this, to show total bandwidth usage per day, week, month and year basis?


Maybe you would be better posting to that thread. They are the ones who created the script.



I have read some posts in zabbix forum, and all are talking about creating graphs for this, but graphs only can show max, min and last values, how can we use this for total bandwidth calculation? Please help me to understand how I can use zabbix for total bandwidth calculation of each ports on the cisco switch.

Thanks in Advance,

consultorpc


You can put your IfInOctets and IfOutOctets in a 'Stacked' graph.

MrKen

nelsonab
25-03-2009, 21:01
I've written a script which can generate a weekly total bandwidth report. If you're interested please let me know. I will warn you, it's development grade code right now, however I'm starting to see more traction and need to improve it. Let me know if you're interested and I can help you get it working.

Here is a sample of what the report looks like:

Bandwidth Report External Procurve 2009-01-11 00:00hrs - 2009-01-18 00:00hrs
+-------------------------------------------------------------------+
| interface | total_readable | outbound_readable | inbound_readable |
+-------------------------------------------------------------------+
| if_01 | 28.28G | 12.78G | 15.5G |
| if_02 | 28.15G | 28.15G | 831.0B |
| if_03 | 2.59G | 1.77G | 835.29M |
| if_04 | 30.95G | 4.09G | 26.86G |
| if_05 | 46.58G | 37.03G | 9.55G |
| if_06 | 0.0B | 0.0B | 0.0B |
| if_07 | 0.0B | 0.0B | 0.0B |
| if_08 | 1.85G | 1.78G | 70.81M |
+-------------------------------------------------------------------+

consultorpc
26-03-2009, 04:29
Yes, I am really interested to get the script and would like to test it.

Thanks

consultorpc

nelsonab
26-03-2009, 05:15
I sent you a private message.

BlackRabbit
22-04-2009, 00:35
I'm interested as well ;-)

nelsonab
22-04-2009, 07:44
Send me a message, there is some work involved to get it to happen, but I'm making some tweaks to make it easier to use overall.

BlackRabbit
24-04-2009, 22:24
You can put your IfInOctets and IfOutOctets in a 'Stacked' graph.

Actually, this is far from nice:
- the 'legend' of the graph becomes huge when adding a lot of ports (eg on a 24port or 48port switch)
- the graph becomes slow to render
- the graph shows artifacts (when some ports are not used, the lines of '0' height are darker than the rest of the filled graph)
- adding 24/48 items to a graph is a lot of work (even when done directly in XMl files)


Is it possible to fix this with ZABBIX_aggregate items? Just create 1 item to collect data from some other items, then create a graph from the 1 collecting item?
I've tried this, but can't figure out how to do this really.

nelsonab
27-04-2009, 19:38
Is it possible to fix this with ZABBIX_aggregate items? Just create 1 item to collect data from some other items, then create a graph from the 1 collecting item?
I've tried this, but can't figure out how to do this really.

Unfortunately no. You cannot aggregate within a host, however if you have the same key on multiple hosts you can aggregate that. The best workaround is to build an external script on the Zabbix host that will provide you with a sum of the last values for a specific list of items. It's not elegant but it does work.

BlackRabbit
27-04-2009, 20:02
Unfortunately no. You cannot aggregate within a host, however if you have the same key on multiple hosts you can aggregate that. The best workaround is to build an external script on the Zabbix host that will provide you with a sum of the last values for a specific list of items. It's not elegant but it does work.
Thanks for your reply. The developers should enable such aggragation-functions within a host :)

nelsonab
28-04-2009, 00:35
It's been asked for for a while now. :-)

Thanks for your reply. The developers should enable such aggragation-functions within a host :)

josea.munoz
16-02-2012, 14:35
Hi,

Is it possible to get the script you are talking about?

Regards

francis.forget
23-02-2012, 21:59
Maybe this addition (http://www.inuvola.ca/zabbix/cisco-mds) to this post will help people having to monitor MDS CISCO switches.

It works perfectly for the following switches:

CISCO MDS9148
CISCO MDS9509

ranforward
29-02-2012, 05:55
Guys, you can use calculated item. I created a calculated item for that interface by adding in both input and output key on this item. and it works.

But I did have a bit of problem initially because the calculated value seems "lag" behind the real-time in/out value. So I changed the "Update Interval" to 5 seconds (from default 30), it looks better now. However we need to monitor the performance impact...

josea.munoz
29-02-2012, 09:06
Thanks, that was exactly what I was looking for.

mgielissen
02-03-2012, 14:09
Guys, you can use calculated item. I created a calculated item for that interface by adding in both input and output key on this item. and it works.

But I did have a bit of problem initially because the calculated value seems "lag" behind the real-time in/out value. So I changed the "Update Interval" to 5 seconds (from default 30), it looks better now. However we need to monitor the performance impact...

Hoe did You get the 95% percentile?

ranforward
05-03-2012, 04:54
There's an option for you to define this when creating the graph "Percentile line (Left)..".