Exclude specific interfaces from being collected

performance-data
collectd
#1

Some servers continuously create and delete tapXY interfaces. Of course OpenNMS is gathering this information from the MIB2 table and starts collecting data for the time, the interface is existent.

At some time you have really many rrd files for tap interfaces on your OpenNMS server which a) require space on your disks and b) can break the node’s resource page because of too many entries.

So I’ve created a policy in a requisition like this to hopefully ignore tap devices.

      <policy name="ignore tap interfaces" class="org.opennms.netmgt.provision.persist.policies.MatchingSnmpInterfacePolicy">
         <parameter key="ifDescr" value="~^tap.*$"/>
         <parameter key="action" value="DO_NOT_PERSIST"/>
         <parameter key="matchBehavior" value="ANY_PARAMETER"/>
      </policy>

Unfortunately OpenNMS still collecting data for tap interfaces.

So my question is: What’s the correct approach to ignore network interfaces by ifDesc?

#2

Try changing <parameter key="matchBehavior" value="ANY_PARAMETER"/>
to <parameter key="matchBehavior" value="ALL_PARAMETERS"/>

I have a similar “do not persist” policy for router interfaces and that seems to work for me.