Repository navigation
feat(routers): merge the SNMP port surface into pusher polls - #1753
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1726
A unit can have
snmp_enabledand also be fed by a pusher.pollRouterreturns as soon as there is a fresh agent payload, so the SNMP branch never ran and the setting was a silent no-op.This adds SNMP as a second source in that path. It only fills what the payload cannot provide:
ifHighSpeed=0in up ports)ifErrors/ifInErrors, only available over SNMP)/interface/lldpmenu), which replaces the FDB guess that labelssfp-sfpplus1as the wrong peerWhat it does not touch: CPU, RAM and temperature (the payload wins since #1724) and the FDB (the agent already sends it). A payload value is never overwritten: the merge only fills empty speeds and zero counters, and an
ifHighSpeed=0from a down port is not propagated as a speed.The SNMP surface is cached per router with the same interval as the SNMP poller (
snmp_poll_interval, 60 s by default), so a 30 s pusher does not turn into two SNMP walks per minute. It reusesrecordSnmpSuccessandrecordSnmpFailure, so the existing "SNMP polling failing" alert still fires on these units. It skipsrecordPortSamplesandportMon.Observeon purpose: the pusher already persists its own series with its own port IDs, and duplicating them here would interleavesnmp-Nrows with the real ones.Five tests cover the merge rules, the down-link case, payload priority for LLDP, the fresh-cache path (no second walk) and the disabled case.