Cisco Mulitcast/Broadcast/Unicast template

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

Moderators: Developers, Moderators

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

Cisco Mulitcast/Broadcast/Unicast template

Post by jfarese »

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 32831 times
cacti_graph_template_interface_-_mbu_packets64-bit.xml
(29.78 KiB) Downloaded 4311 times
_CL
Posts: 39
Joined: Mon Feb 25, 2008 5:01 pm
Location: USA

Post by _CL »

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 32753 times
cacti_interface_x.zip
(16.45 KiB) Downloaded 5083 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

Post by _CL »

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

Post by marcmo »

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

Post by _CL »

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

Post by marcmo »

_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

Post by _CL »

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 32675 times
CL
_CL
Posts: 39
Joined: Mon Feb 25, 2008 5:01 pm
Location: USA

Post by _CL »

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 32671 times
x-data-templates.png
x-data-templates.png (14.78 KiB) Viewed 32671 times
x-data-query.png
x-data-query.png (35.12 KiB) Viewed 32671 times
CL
marcmo
Posts: 27
Joined: Wed Sep 21, 2005 3:39 pm

Post by marcmo »

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

Post by marcmo »

Here is my interface.xml file ...
Attachments
interface.xml
(5.03 KiB) Downloaded 1668 times
_CL
Posts: 39
Joined: Mon Feb 25, 2008 5:01 pm
Location: USA

Post by _CL »

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 32665 times
CL
marcmo
Posts: 27
Joined: Wed Sep 21, 2005 3:39 pm

Post by marcmo »

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

Post by _CL »

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

Post by marcmo »

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

Post by didoll »

_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

Who is online

Users browsing this forum: No registered users and 0 guests