#23726·netdata

[Feat]: snmp_topology: per-device, per-protocol control of topology collection (skip FDB/ARP walks on weak SNMP agents)

Author: ktsaouCreated Sep 1, 2026Updated Sep 1, 2026

Problem

snmp_topology decides what to walk on each device purely through profile selectors (sysObjectID/sysDescr). There is no user-facing configuration to exclude a device from topology collection, or to enable/disable individual topology protocols (LLDP vs CDP vs bridge FDB vs Q-BRIDGE vs ARP vs STP) per device.

This matters because some SNMP agents serve large dynamic tables very poorly. RouterOS is the canonical example:

snmp_topology runs its walks on separate gosnmp sessions from the metric jobs (src/go/plugin/go.d/collector/snmp_topology/collector.go), so it cannot block metric collection in our code — but both sessions hit the same device concurrently. On a device whose SNMP agent degrades under an FDB/ARP walk, the metric session is starved device-side and the SNMP charts get gaps. The operator currently has no way to say "map this device via LLDP only, never walk its FDB/ARP".

Current configuration surface (for reference)

  • snmp job config has no topology-related field; every discovered device is registered into the topology device store unconditionally (collector/snmp/device_state.go).
  • snmp_topology job config has only update_every and refresh_every (collector/snmp_topology/config.go).
  • The only global switch is disabling the whole snmp_topology module in go.d.conf; the only per-protocol lever is overriding profile YAMLs, which is not a reasonable operator interface.

Proposal

Allow per-device, per-protocol control of topology collection, e.g. a topology: section on the snmp job (inherited by the device's registration in the device store):

jobs:
  - name: mikrotik-router
    hostname: 10.20.4.1
    topology:
      enabled: true            # false = metrics only, never register for topology
      protocols:
        lldp: true
        cdp: true
        fdb: false             # bridge-MIB + Q-BRIDGE FDB walks
        arp: false             # ipNetToMedia / ipNetToPhysical
        stp: true

Equivalent per-device overrides on the snmp_topology job would also work. Useful extras: per-device walk pacing/timeout overrides for topology walks (currently inherited from the metric job's options), and surfacing per-device refresh duration so operators can spot slow devices.

Prior art

Environment

Observed against a MikroTik CCR2004-16G-2S+ (RouterOS 7.24) and CRS-class switches in a lab with ~12 SNMP devices; netdata nightly (v2.11 dev), snmp_topology with refresh_every: 30m, refresh duration 17–19 s.