AL9 - snmpd crashes regularly with "error on subcontainer 'ifTable container' remove (-1)" message

A coworker pointed me to workarounds : you can Exclude or Filter interfaces in your /etc/snmp/snmpd.conf.

This should avoid docker interfaces that are created and deleted every second to crash snmpd.

I chose to filter/whitelist instead of excluding as I’m not certain to predict the docker interfaces names.

Here is the include_ifmib_iface_prefix doc (debian) :
https://manpages.debian.org/unstable/snmpd/snmpd.conf.5.en.html#include_ifmib_iface_prefix

This filters interfaces that are included in the MIB data collection by iface prefix.

As my “real” interfaces I want to monitor are all named “eth[number]” or “enX[number]”, prefix is perfect.

Here is a snippet of my /etc/snmp/snmpd.conf.

# To avoid crash like "error on subcontainer 'ifTable container' remove" caused by docker creating and deleting a lot of interfaces.
# Doc : Sets the interface name prefixes to include in the IF-MIB data collection. For servers with a large number of interfaces the IF-MIB processing will take a large chunk of CPU for ioctl calls (on Linux).
#       A set of space separated interface name prefixes will reduce the CPU load for IF-MIB processing
include_ifmib_iface_prefix eth enX

EDIT : It crashed again :frowning: