[mrtg] Ignoring certain types of interfaces

Steve Shipway s.shipway at auckland.ac.nz
Sat Oct 18 05:00:17 CEST 2008

>'--if-filter=$default && $if_type!=28 && $if_type!=1 && $if_type!=24 && $if_type!=135'
>The VE interfaces show up in ifType as 135 so I thought this would work.

That filter will not work - the filter is supposed to evaluate to 'true' if you want to KEEP the interface, not if you want to remove it.  Also, this is Perl, so use 'and' and 'or' and not '&&' and '||' (as you would in C).  So you need something like:

--if-filter='$default or ($if_type==28) or ($if_type==1) or ($if_type==24) or ($if_type==135)'

Put brackets around the tests if it makes you feel more comfortable.


More information about the mrtg mailing list