Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 34 additions & 4 deletions stacks/observability/snmp-exporter/generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,42 @@ modules:
# per-request timeout, so those values are pinned here rather than left to
# the exporter's defaults (max_repetitions 25, retries 3, timeout 5s).
#
# 5 * ~22 ifTable columns is a handful of round trips against a switch that
# cannot absorb 25. Worst case here is retries * timeout = 21s, comfortably
# inside the job's 45s scrape_timeout.
# Worst case here is retries * timeout = 21s, comfortably inside the job's 45s
# scrape_timeout.
#
# Only the five columns anything actually consumes are walked. This switch was
# bricked once by a full walk and has wedged since, so scrape volume is a
# safety property here, not an efficiency one. Five columns x 26 ports is ~130
# varbinds, about a quarter of what walking the whole ifTable costs.
#
# Column 22 (ifSpecific) must never be fetched. This switch returns it with a
# zero-length value, seen on the wire as
#
# .1.3.6.1.2.1.2.2.1.22.26=
#
# An OBJECT IDENTIFIER cannot be zero-length, so snmp-exporter rejects the
# entire GETBULK response with
#
# error in unmarshalResponse: error parsing OID Value: invalid OID length
#
# and the scrape yields nothing — one malformed varbind loses every metric.
#
# Note this is why column 21 is absent too, and why listing columns 1-21 did
# NOT fix it: GETBULK returns the next N varbinds and does not stop at a
# subtree boundary, so walking .21 overshoots into .22 and the bad varbind
# comes back anyway. The last column walked must be far enough from .22 that
# max_repetitions cannot reach it. `overrides: ifSpecific: ignore` does not
# help either — that only drops the metric, the reply must still be decoded.
#
# Adding a column is cheap; adding .21 or .22 is not. Anything past .16 needs
# to be checked against this.
mokerlink:
walk:
- 1.3.6.1.2.1.2.2 # IF-MIB::ifTable
- 1.3.6.1.2.1.2.2.1.1 # ifIndex
- 1.3.6.1.2.1.2.2.1.2 # ifDescr (label lookup)
- 1.3.6.1.2.1.2.2.1.8 # ifOperStatus (SwitchPortDown)
- 1.3.6.1.2.1.2.2.1.10 # ifInOctets
- 1.3.6.1.2.1.2.2.1.16 # ifOutOctets
max_repetitions: 5
retries: 2
timeout: 7s
Expand Down
Loading
Loading