Page MenuHomeVyOS Platform

Add ability to set include_ifmib_iface_prefix and ifmib_max_num_ifaces for SNMP
Closed, ResolvedPublicFEATURE REQUEST

Description

  1. Add the ability to set include_ifmib_iface_prefix for SNMP.
.IP "include_ifmib_iface_prefix PREFIX1 PREFIX2 ..."
Sets the interface name prefixes to include in the IF-MIB data collection.
For servers with a large number of interfaces (ppp, dummy, bridge, etc)
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.  For example, configuring
"include_ifmib_iface_prefix eth dummy lo" will include only interfaces
with these prefixes and ignore all others for IF-MIB processing.

https://github.com/net-snmp/net-snmp/blob/0175f031c1bd902bf9fbd5c698298f645f449606/man/snmpd.conf.5.def#L105C1-L112C65

Proposed CLI

set service snmp interface-mib-prefix eth
set service snmp interface-mib-prefix dummy

Or

set service snmp interface-mib prefix eth
set service snmp interface-mib prefix dummy
  1. Another useful option ifmib_max_num_ifaces NUM
.IP "ifmib_max_num_ifaces NUM"
Sets the maximum number of interfaces included in IF-MIB data collection.
For servers with a large number of interfaces (ppp, dummy, bridge, etc)
the IF-MIB processing will take a large chunk of CPU for ioctl calls
(on Linux). Setting a reasonable maximum for the CPU used will
reduce the CPU load for IF-MIB processing.  For example, configuring
"ifmib_max_num_ifaces 500" will include only the first 500 interfaces
based on ifindex and ignore all others for IF-MIB processing.

Proposed CLI:

set service snmp interface-mib max xx

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Feature (new functionality)

Event Timeline

Viacheslav renamed this task from Add ability to set include_ifmib_iface_prefix for SNMP to Add ability to set include_ifmib_iface_prefix and ifmib_max_num_ifaces for SNMP.Oct 31 2023, 4:15 PM
Viacheslav updated the task description. (Show Details)
Viacheslav changed the task status from Open to In progress.Nov 4 2023, 9:26 AM
Viacheslav claimed this task.
Viacheslav updated the task description. (Show Details)

PR https://github.com/vyos/vyos-1x/pull/2434

set service snmp community public client '127.0.0.1'
set service snmp mib interface-max '25'
set service snmp mib interface 'eth'
set service snmp mib interface 'bond'
Viacheslav moved this task from Need Triage to Finished on the VyOS 1.5 Circinus board.
Viacheslav moved this task from Need Triage to Finished on the VyOS 1.4 Sagitta board.