Host Template: VLAN Statistics (for Catalyst 4500)
Moderators: Developers, Moderators
Host Template: VLAN Statistics (for Catalyst 4500)
Hi all:
I'm pretty new using Cacti, but I have done some templates for monitoring VLAN Traffic. At the moment this template only allows to monitor bits and bytes per second, but it is relatively easy to extend it for monitoring packets that hit the VLANs.
These were my first templates. I'm using Cacti only for 2 weeks, and I have never exported a Template, so it is possible that I have done any mistake. Use it at your own risk (I don't really think that something wrong can happens, but it is my first time )
I think that the method to export them is creating a host template, and then associate to it the new data queries and grpah templates. Finally I've exported the new host template. If I have done any mistake, please, let me know.
I'm monitoring a Cisco Catalyst 4500 Switch using Cacti 8.6.i. I'm monitoring 64-bit counters, so you will need to use at leats version 2 of snmp. I hope that this template could help.
Regards.
[/img]
I'm pretty new using Cacti, but I have done some templates for monitoring VLAN Traffic. At the moment this template only allows to monitor bits and bytes per second, but it is relatively easy to extend it for monitoring packets that hit the VLANs.
These were my first templates. I'm using Cacti only for 2 weeks, and I have never exported a Template, so it is possible that I have done any mistake. Use it at your own risk (I don't really think that something wrong can happens, but it is my first time )
I think that the method to export them is creating a host template, and then associate to it the new data queries and grpah templates. Finally I've exported the new host template. If I have done any mistake, please, let me know.
I'm monitoring a Cisco Catalyst 4500 Switch using Cacti 8.6.i. I'm monitoring 64-bit counters, so you will need to use at leats version 2 of snmp. I hope that this template could help.
Regards.
[/img]
- Attachments
-
- cacti_host_template_cisco_router_with_vlan_statistics.xml
- Template based on the Cisco Router template that also is able to monitos VLAN Statistics
- (129.45 KiB) Downloaded 4083 times
As far as I know, no, it isn't the same. I have to use Version 0.8.6i. I was able to see and to check the VLANs of the standard "SNMP - Interface Statistics", but cacti was unable to get any traffic data for these items. The OID that cacti should walk in order to get some data for VLANs have a double index instead of the typical "ifIndex" (1) used to obtain the traffic of the interfaces. The index of VLANs data was something like "ifIndex.NumberOfVlan" (2). The "interface.xml" under the directory "resource/snmp_queries" is not able to navigate in order to get data from "smonVlanIdStatsTotalHCOctets", because interface.xml uses (1) as index, and this data is accesible using (2) instead of (1).niobe wrote:Isn't this exactly the same as the existing interface graphs??
As I said, I must use cacti version 0.8.6i. Perhaps new versions are able to get this data. I have no notice about it. I googled a little bit and I only found requests to do it. So I wrote this template.
Have you monitored VLAN traffic (in a Cisco 4500 Switch) using the standar SNMP data Query? Which version of cacti are you using? How did you monitor that?
Regards.
TrilceAC
No I haven't tried to monitor a VLAN interface, though we have both 4500s and 6500s. Hrmm, now I think about it, I think I consciously avoided monitoring the VLAN interfaces since I know the counters in "show interface" are inaccurate for VLAN interfaces on the multilayer switches...so not surprised that the SNMP version doesn't work so well. Will definitely have a closer look at your template.
By the way , what supervisor are you using this with?
cheers,
N
By the way , what supervisor are you using this with?
cheers,
N
-
- Cacti Guru User
- Posts: 1884
- Joined: Mon Oct 16, 2006 5:57 am
- Location: United Kingdom
- Contact:
Re: Host Template: VLAN Statistics (for Catalyst 4500)
I get "Could not find data query XML file at 'C:/wamp/www/Cacti/resource/snmp_queries/vlan-snmp.xml'" when I run a verbose query, so it looks like the data query is missing.
Could you please post this ?
Thanks
Could you please post this ?
Thanks
Cacti Version 0.8.8b
Cacti OS Ubuntu LTS
RRDTool Version RRDTool 1.4.7
Poller Information
Type SPINE 0.8.8b
Oh, sorry. I'm newbie and that is my first template. I thought that I only had to export a host template and check the dependencies button. But now I know that it is not enough.
Here you have the data query that I wrote. There are more fields than the used by the template, so it is possible to complete the template in order to monitor more data. At the moment this template does not query all the monitorable information of VLANs. It is also possible to complete the data query by adding the missed OIDs, and then to complete the host template.
Do you also need the data template or the graph template? I hope that you don't, but let me know if you need it and if this template with the query works for you.
---> Take care when saving this xml data query. You should save it as "vlan-snmp.xml" under your "resources/snmp_queries/" directory.
Enjoy.
Here you have the data query that I wrote. There are more fields than the used by the template, so it is possible to complete the template in order to monitor more data. At the moment this template does not query all the monitorable information of VLANs. It is also possible to complete the data query by adding the missed OIDs, and then to complete the host template.
Do you also need the data template or the graph template? I hope that you don't, but let me know if you need it and if this template with the query works for you.
---> Take care when saving this xml data query. You should save it as "vlan-snmp.xml" under your "resources/snmp_queries/" directory.
Enjoy.
- Attachments
-
- vlan-snmp.xml
- xml data query to monitor VLAN statistics. SAVE IT AS "vlan-snmp.xml" UNDER your ...cacti/resources/snmp_queries/ directory or the template will not work.
- (1.99 KiB) Downloaded 2749 times
TrilceAC
Hey, have finally had a look at this since I want to graph some vlan data..
I have tracked the OIDs from your query to SMON.MIB. First thing I notice is the MIB cannot separate inbound and outbound data. Kinda makes sense to have an OID only interested in the number of packets/bits switched by a Catalyst, but I was hoping there'd be a sum of all the packets in and out of all interfaces in a vlan - guess this would be a fair bit trickier.
Anyway, just a suggestion to make this clear in your templates, so people don't think this is the same as traffic on an interface but for VLANs e.g. Graph legend "packets switched" or similar
cheers,
N
I have tracked the OIDs from your query to SMON.MIB. First thing I notice is the MIB cannot separate inbound and outbound data. Kinda makes sense to have an OID only interested in the number of packets/bits switched by a Catalyst, but I was hoping there'd be a sum of all the packets in and out of all interfaces in a vlan - guess this would be a fair bit trickier.
Anyway, just a suggestion to make this clear in your templates, so people don't think this is the same as traffic on an interface but for VLANs e.g. Graph legend "packets switched" or similar
cheers,
N
Cisco Catalyst VLAN Traffic Stats
I have tweaked this a little..hope you don't mind
- Fixed OID regexp which was broken for index numbers not exactly 3 digits
- Added non unicast octets (or packets - forgot which one was missing).
- New 'sexy' graph templates for Packets and Traffic (see http://forums.cacti.net/viewtopic.php?t=25415)
- Clarified on axis that these stats are in+out
- Renamed some names/fields slightly to be consistent with other queries
I have tested on Catalyst 6500 and 4500, works a treat.
cheers,
N
- Fixed OID regexp which was broken for index numbers not exactly 3 digits
- Added non unicast octets (or packets - forgot which one was missing).
- New 'sexy' graph templates for Packets and Traffic (see http://forums.cacti.net/viewtopic.php?t=25415)
- Clarified on axis that these stats are in+out
- Renamed some names/fields slightly to be consistent with other queries
I have tested on Catalyst 6500 and 4500, works a treat.
cheers,
N
- Attachments
-
- VLAN Traffic Graph
- cisco.vlan.traffic.png (30.89 KiB) Viewed 42796 times
-
- VLAN Packets Graph
- cisco.vlan.packets.png (31.19 KiB) Viewed 42796 times
-
- cisco_vlan.xml
- Cisco VLAN Stats query
- (2.11 KiB) Downloaded 3401 times
-
- cacti_data_query_cisco_-_vlan_statistics.xml
- Cisco VLAN Templates
- (33.07 KiB) Downloaded 3529 times
Thank you for completing my work. My boss only wanted to monitor traffic on VLANs (bits per second). He has no interest on packets. As this was the fisrt time that I use cacti (and any other monitoring-tool, I'm newbie in a new work with a new boss) I spent a lot of time learning. I would like to complete the hole template but I ran out of time and I received new tasks. It is nice to see that someone has helped me and has complete it Thanks a lot, I'll use it
As you mentioned you have tunned the graphs. I detected some mistakes in mines. First, I wasn't able to draw the colored box with the name of the area in the legend of the graphs. I see that you have done it. I am not sure what I have forgotten, I'll compare check your template to find my mistake
I also wanted to draw together total and non-unicast traffic. But I was trying to do something a little bit more complicated. I wanted to infer the unicast traffic given the total- and the non-unicast traffic. It is only supposed to be a difference between both values, but since I have no previous experience with CDEFs, I was not able to get this result. Is it possible to compute this difference and draw it using cacti?
Thanks again niobe for the very big enhancements to these templates. I'll download it now
TrilceAC
As you mentioned you have tunned the graphs. I detected some mistakes in mines. First, I wasn't able to draw the colored box with the name of the area in the legend of the graphs. I see that you have done it. I am not sure what I have forgotten, I'll compare check your template to find my mistake
I also wanted to draw together total and non-unicast traffic. But I was trying to do something a little bit more complicated. I wanted to infer the unicast traffic given the total- and the non-unicast traffic. It is only supposed to be a difference between both values, but since I have no previous experience with CDEFs, I was not able to get this result. Is it possible to compute this difference and draw it using cacti?
I used a fixed length of 3 digits because the index numbers used by my router for this particular issue have a fixed length of 3 digits. I thought that every router would work like mine. Sorry if this is not true.- Fixed OID regexp which was broken for index numbers not exactly 3 digits
Thanks again niobe for the very big enhancements to these templates. I'll download it now
TrilceAC
TrilceAC
-
- Posts: 4
- Joined: Fri Jun 15, 2007 12:28 pm
c3560 and vlan stats
I tried this query on a catalyst 3560 and I got this:
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.16.22.1.2.2.1.7'
+ No SNMP data returned
Could it be I need a different index for this model? Where do I go about finding this sort of thing?
Thanks...
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.16.22.1.2.2.1.7'
+ No SNMP data returned
Could it be I need a different index for this model? Where do I go about finding this sort of thing?
Thanks...
-
- Posts: 4
- Joined: Fri Jun 15, 2007 12:28 pm
Maybe I'm out of luck...
snmpwalk returns:
SNMPv2-SMI::mib-2.16.22.1.2.2.1.7 = No Such Object available on this agent at this OID
SNMPv2-SMI::mib-2.16.22.1.2.2.1.7 = No Such Object available on this agent at this OID
Hey, Im pretty new to cacti and SNMP in general, but im trying to get the VLAN monitoring working on a Catalyst 4506 running IOS 12.1(19) with snmp version 3.
I was able to get a basic interface monitored with SNMP however the VLAN template isnt working. When I go to check the "Cisco - VLAN Statistics" query on the device listing, the verbose output says:
This is using the last 2 XML files posted above me.
How do I get this to work on a catalyst 4506? Sorry if Im asking stupid questions but I have little experience with SNMP monitoring and googling for the past few hours hasnt gotten me any results. Thanks
I was able to get a basic interface monitored with SNMP however the VLAN template isnt working. When I go to check the "Cisco - VLAN Statistics" query on the device listing, the verbose output says:
Code: Select all
+ Running data query [11].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/html/resource/snmp_queries/cisco_vlan.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.16.22.1.2.2.1.7'
+ No SNMP data returned
+ Found data query XML file at '/var/www/html/resource/snmp_queries/cisco_vlan.xml'
+ Found data query XML file at '/var/www/html/resource/snmp_queries/cisco_vlan.xml'
+ Found data query XML file at '/var/www/html/resource/snmp_queries/cisco_vlan.xml'
How do I get this to work on a catalyst 4506? Sorry if Im asking stupid questions but I have little experience with SNMP monitoring and googling for the past few hours hasnt gotten me any results. Thanks
The thing to try is a manual snmp walk. If you're using *nix the command is snmpwalk usually part of snmp-utils package. Use the OID contained in your message and see what result you get.overlord wrote: How do I get this to work on a catalyst 4506? Sorry if Im asking stupid questions but I have little experience with SNMP monitoring and googling for the past few hours hasnt gotten me any results. Thanks
If you get something like "value not defined at this OID" or similar, then your software does not support this snmp query. I would suspect this is the case since I think you are running quite an old version - you might want to upgrade!
cheers,
N
Who is online
Users browsing this forum: No registered users and 1 guest