diff --git a/data/templates/snmp/etc.snmpd.conf.j2 b/data/templates/snmp/etc.snmpd.conf.j2 index 9d78d479ae..3db8c4d7bc 100644 --- a/data/templates/snmp/etc.snmpd.conf.j2 +++ b/data/templates/snmp/etc.snmpd.conf.j2 @@ -56,6 +56,16 @@ SysDescr {{ description }} {% endif %} agentaddress unix:/run/snmpd.socket{{ ',' ~ options | join(',') if options is vyos_defined }} +{% if mib is vyos_defined %} +# Interface MIB limits +{% if mib.interface_max is vyos_defined %} +ifmib_max_num_ifaces {{ mib.interface_max }} +{% endif %} +{% if mib.interface is vyos_defined %} +include_ifmib_iface_prefix {{ mib.interface | join(' ') }} +{% endif %} +{% endif %} + # SNMP communities {% if community is vyos_defined %} {% for comm, comm_config in community.items() %} diff --git a/interface-definitions/snmp.xml.in b/interface-definitions/snmp.xml.in index 0851b83895..ec2151b98e 100644 --- a/interface-definitions/snmp.xml.in +++ b/interface-definitions/snmp.xml.in @@ -79,6 +79,101 @@ #include + + + Management information base (MIB) + + + + + Sets the maximum number of interfaces included in IF-MIB data collection + + u32:1-4294967295 + Sets the maximum number of interfaces included in IF-MIB data collection + + + + + + + + + Sets the interface name prefix to include in the IF-MIB data collection + + br bond dum eth gnv macsec peth sstpc tun veth vti vtun vxlan wg wlan wwan + + + br + Allow prefix for IF-MIB data collection + + + bond + Allow prefix for IF-MIB data collection + + + dum + Allow prefix for IF-MIB data collection + + + eth + Allow prefix for IF-MIB data collection + + + gnv + Allow prefix for IF-MIB data collection + + + macsec + Allow prefix for IF-MIB data collection + + + peth + Allow prefix for IF-MIB data collection + + + sstpc + Allow prefix for IF-MIB data collection + + + tun + Allow prefix for IF-MIB data collection + + + veth + Allow prefix for IF-MIB data collection + + + vti + Allow prefix for IF-MIB data collection + + + vtun + Allow prefix for IF-MIB data collection + + + vxlan + Allow prefix for IF-MIB data collection + + + wg + Allow prefix for IF-MIB data collection + + + wlan + Allow prefix for IF-MIB data collection + + + wwan + Allow prefix for IF-MIB data collection + + + (br|bond|dum|eth|gnv|macsec|peth|sstpc|tun|veth|vti|vtun|vxlan|wg|wlan|wwan) + + + + + + IP address to listen for incoming SNMP requests