Cisco Mulitcast/Broadcast/Unicast template

Templates, scripts for templates, scripts and requests for templates.

Moderators: Moderators, Developers

Author
Message
jfarese
Posts: 31
Joined: Wed Dec 06, 2006 8:45 am

Cisco Mulitcast/Broadcast/Unicast template

#1 Post by jfarese » Mon Jun 16, 2008 10:04 am

For anyone looking to differentiate between multicast/broadcast/unicast packets. I have created a template which is attached. The only other thing is you will need to add the following lines to the into interface.xml located in cacti/resource.snmp_queries. It would be great to have these added to the cacti main branch as nonunicast is considered to be depricated and should no longer be used.

<ifHCInMulticastPkts>
<name>Multicast Packets In</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.2.1.31.1.1.1.8</oid>
</ifHCInMulticastPkts>
<ifHCOutMulticastPkts>
<name>Multicast Packets Out</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.2.1.31.1.1.1.12</oid>
</ifHCOutMulticastPkts>
<ifHCInBroadcastPkts>
<name>Broadcast Packets In</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.2.1.31.1.1.1.9</oid>
</ifHCInBroadcastPkts>
<ifHCOutBroadcastPkts>
<name>Broadcast Packets Out</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.2.1.31.1.1.1.13</oid>
</ifHCOutBroadcastPkts>
Attachments
MBU.PNG
MBU.PNG (81.78 KiB) Viewed 29736 times
cacti_graph_template_interface_-_mbu_packets64-bit.xml
(29.78 KiB) Downloaded 4118 times

_CL
Posts: 39
Joined: Mon Feb 25, 2008 5:01 pm
Location: USA

#2 Post by _CL » Tue Jun 17, 2008 11:13 am

I like the idea of putting the outbound traffic on a negative scale.

Your post reminded me to post my templates for ifXTable in the IF-MIB. I took the Cacti Interface Stats templates and added the ifXTable values. I prefixed the original Cacti templates with (32-bit) and the new data templates with (64-bit). My high capacity graphs for uni/multi/broadcast only show one direction (in or out). I've included an input sample graph.

I've attached the data query I use and all its dependencies. If anyone is interested in it, I wouldn't import the data template except on a test system. It will probably overwrite some of the standard stuff integrated into Cacti.
Attachments
packets_in_corrected.png
packets_in_corrected.png (63.17 KiB) Viewed 29658 times
cacti_interface_x.zip
(16.45 KiB) Downloaded 4698 times
Last edited by _CL on Tue Jun 17, 2008 11:38 am, edited 1 time in total.
CL

_CL
Posts: 39
Joined: Mon Feb 25, 2008 5:01 pm
Location: USA

#3 Post by _CL » Tue Jun 17, 2008 11:17 am

Funny how I use something for months and never notice an error until I publicly post it. The Total number in the sample graph is wrong. Apparently, the CDEF for "Total All Data Sources" isn't working. I will look into this and post a correction.

Edit: I fixed the problem. I refreshed the attachments in the previous post.
CL

marcmo
Posts: 27
Joined: Wed Sep 21, 2005 3:39 pm

#4 Post by marcmo » Wed Jun 18, 2008 8:13 am

Question: Does the new interfaces.xml file have to be re-imported? Did you remove the deprecated fields (non-Unicast) from this file?

Thanks,

marcmo

_CL
Posts: 39
Joined: Mon Feb 25, 2008 5:01 pm
Location: USA

#5 Post by _CL » Wed Jun 18, 2008 8:31 am

marcmo, I left interfaces.xml alone and created a new interfaces_x.xml that includes the ifEntry and the ifXentry values. I did not take out any deprecated values.

My comment about my template possible overwriting stuff refers to the fact that I have seen renamed data templates overwriting original templates on import. I prefaced the original Cacti data templates for interface.xml with the string "(32-bit)". I am not sure if these will import as new data templates or overwrite the original ones.
CL

marcmo
Posts: 27
Joined: Wed Sep 21, 2005 3:39 pm

#6 Post by marcmo » Wed Jun 18, 2008 8:56 am

_CL,

I added but did not delete anything from my interfaces.xml -- made a backup copy just in case though. The graph template imported fine but I haven't been able to get this to work ...

Maybe I am looking at this the wrong way, where should I be looking for these new fields? I see the graph template underneath the drop down box in the Associated Graph Templates region but when I go to add an interface graph I do not see the new fields in the graph type drop down box, somewhere something is crossed up.

marcmo

_CL
Posts: 39
Joined: Mon Feb 25, 2008 5:01 pm
Location: USA

#7 Post by _CL » Wed Jun 18, 2008 9:19 am

Did you add the new data query to the device page? Attached is what I have.
Attachments
x-assoc-data-queries.png
x-assoc-data-queries.png (12.58 KiB) Viewed 29580 times
CL

_CL
Posts: 39
Joined: Mon Feb 25, 2008 5:01 pm
Location: USA

#8 Post by _CL » Wed Jun 18, 2008 9:21 am

While I am at it, here are some other screen captures. The first is the data query. The second is an excerpt from my data templates page. The last is an excerpt from my graph templates page.
Attachments
x-graph-templates.png
x-graph-templates.png (15.65 KiB) Viewed 29576 times
x-data-templates.png
x-data-templates.png (14.78 KiB) Viewed 29576 times
x-data-query.png
x-data-query.png (35.12 KiB) Viewed 29576 times
CL

marcmo
Posts: 27
Joined: Wed Sep 21, 2005 3:39 pm

#9 Post by marcmo » Wed Jun 18, 2008 9:25 am

Hmmm,

I do not see that as a choice under the Associated Data Query drop down box (which is where I would have expected to see it). I am missing something here.

marcmo
Posts: 27
Joined: Wed Sep 21, 2005 3:39 pm

#10 Post by marcmo » Wed Jun 18, 2008 9:28 am

Here is my interface.xml file ...
Attachments
interface.xml
(5.03 KiB) Downloaded 1485 times

_CL
Posts: 39
Joined: Mon Feb 25, 2008 5:01 pm
Location: USA

#11 Post by _CL » Wed Jun 18, 2008 9:31 am

Did the data query import correctly? (Or maybe I messed up the export?)
Attachments
x-data-queries.png
x-data-queries.png (31.99 KiB) Viewed 29570 times
CL

marcmo
Posts: 27
Joined: Wed Sep 21, 2005 3:39 pm

#12 Post by marcmo » Wed Jun 18, 2008 9:33 am

Weird, I have entries in Data and Graph Templates but nothing under the Data Queries section.

_CL
Posts: 39
Joined: Mon Feb 25, 2008 5:01 pm
Location: USA

#13 Post by _CL » Wed Jun 18, 2008 9:33 am

marcmo wrote:Here is my interface.xml file ...
Did you use jfarese's method (edit your interfaces.xml file) or did you import my templates?

If you used jfarese's stuff, then did you run the Verbose Query on the devices page?
CL

marcmo
Posts: 27
Joined: Wed Sep 21, 2005 3:39 pm

#14 Post by marcmo » Wed Jun 18, 2008 9:42 am

CL,

Ah! I think I figured out one piece of what's going on as we are cross posting each other. I did not import your templates, I only made the original changes! I did do the Verbose Query but when it gets to the part where I would expect it to spit out the new info I get this:

Code: Select all

+ Found item [ifIP='127.0.0.61'] index: 118 [from regexp oid parse]
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/interface.xml'
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/interface.xml'
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/interface.xml'
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/interface.xml'
Till the end of the query. When I run a snmpwalk on these oid's I do get valid info:

Code: Select all

 snmpwalk -c mycommunity 10.x.x.x .1.3.6.1.2.1.31.1.1.1.12    
IF-MIB::ifHCOutMulticastPkts.2 = Counter64: 45813027513
IF-MIB::ifHCOutMulticastPkts.3 = Counter64: 61587965417
IF-MIB::ifHCOutMulticastPkts.4 = Counter64: 78893311221
IF-MIB::ifHCOutMulticastPkts.5 = Counter64: 43973653082
IF-MIB::ifHCOutMulticastPkts.6 = Counter64: 28521555762
IF-MIB::ifHCOutMulticastPkts.7 = Counter64: 31315499
IF-MIB::ifHCOutMulticastPkts.8 = Counter64: 57869562246
IF-MIB::ifHCOutMulticastPkts.9 = Counter64: 157378150
We do a ton of Multicast so I am not of the mind to drop this.

Thanks for your help, btw.

marcmo
[/code]

didoll
Posts: 3
Joined: Fri Sep 05, 2008 3:40 am

#15 Post by didoll » Fri Sep 05, 2008 6:05 am

_CL,I tried to use your template,but I got a large count in multicast & broadcast,just like the graph jfarese post
I got 600m multicast packets/sec,apparently,it's wrong,only 3-5 multicast packets/sec on that port.
So I am intresting which version cacti you used,I tried on 0.8.6.i & 0.8.7.b,all faults.
Thanks.

Post Reply