[mrtg] cfgmaker modification to filter out all cisco vlan interfaces (event unrouted-VLAN-n ints)

Greg.Volk at edwardjones.com Greg.Volk at edwardjones.com
Fri Jun 17 20:29:27 MEST 2005

I am in the process of upgrading MRTG from v2.9.17 to v2.12.1 
and ran into some interface include/exclude differences in 

As a general rule, I never want to include any type of vlan 
interfaces in my polling. It has been my experience that vlan 
byte in/out usage statistics are often bogus. In the past I had
accomplished this with various filters, pipes, greps, etc, it 
was ugly but worked. This time around, I want to use only the
cfgmaker --if-filter directive and get rid of the pipes, and 
greps. In cfgmaker, I noticed that the pattern match for 
$if_is_ciscovlan is

my $if_is_ciscovlan = 
($$router_dev{Vendor} eq 'cisco' and $$i{Descr} =~ /^V(LAN|lan)\d+$/

Unfortuantely, this does not match the "unrouted-vlan" interfaces
that are plentiful on cisco 6509's with certain native IOS levels. 
In particular, I am running 12.1(22)E1 and I end up with lots of
useless unrouted-vlan graphs. I also tried excluding them with 
$if_vlan_id but that had the unwanted side affect of commenting out 
my portchannel interfaces and I want the portchannel graphs.

Anyway, to get my question, has anyone else found a way to exclude
the 'unrouted-VLAN-1' interfaces? I tried modifying the above regex

my $if_is_ciscovlan = 
($$router_dev{Vendor} eq 'cisco' and $$i{Descr} =~ 
/^(VLAN|Vlan|unrouted)\d+$/ );

...but the unrouted vlans are still being included in the config 
(and not commented out). I'm not sure why my modified regex isn't 

Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://lists.ee.ethz.ch/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi

More information about the mrtg mailing list