| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…r fallback - Lower default MaxOIDs from 60 to 20 for more reliable SNMP polling. - Remove 32-bit counter alternatives from IF-MIB virtual metrics to prevent counter type switching between collection cycles, which causes overflow due to mixing 32-bit and 64-bit counter values.
There was a problem hiding this comment.
No issues found across 4 files
Confidence score: 5/5
sequenceDiagram
participant Config as Profile Configuration
participant Collector as SNMP Collector
participant Client as SNMP Client (gosnmp)
participant Device as SNMP Device (Agent)
Note over Collector,Device: Collection Cycle Started
Collector->>Config: Load IF-MIB Metric Definitions
Config-->>Collector: Return OIDs (64-bit HC counters only)
Note over Collector: CHANGED: Batching logic now uses MaxOIDs=20 (down from 60)
loop Every 20 OIDs
Collector->>Client: Send GetRequest (Batch)
Client->>Device: SNMP GET (PDU)
alt Device supports requested OIDs
Device-->>Client: Response (Success)
Client-->>Collector: Return Variable Bindings
else Device OID not found / Timeout
Device-->>Client: Response (Error Status)
Client-->>Collector: Return Error/Partial Data
end
end
Note over Collector: Metric Processing (Virtual Metrics)
alt NEW: Device has 64-bit counters (ifXTable)
Collector->>Collector: Calculate ifTraffic (in/out)
Collector->>Collector: Calculate ifPacketsUcast (in/out)
else CHANGED: Device only has 32-bit counters (ifTable)
Note over Collector: 32-bit fallback REMOVED for Traffic/Unicast
Collector->>Collector: Skip Traffic/Unicast metrics (prevent overflow)
end
Collector->>Collector: Process 32-bit Errors/Discards (Still Supported)
Note over Collector,Device: Collection Cycle Finished
Sorry, something went wrong.
There was a problem hiding this comment.
This PR adjusts SNMP collector defaults and the standard IF-MIB profile to improve polling reliability and prevent counter-type switching (32-bit vs 64-bit) across collection cycles.
Changes:
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/go/plugin/go.d/config/go.d/snmp.profiles/default/_std-if-mib.yaml | Disables 32-bit traffic/unicast counters and removes fallback alternatives so traffic metrics use HC-only counters. |
| src/go/plugin/go.d/collector/snmp/config_schema.json | Lowers the documented schema default for options.max_request_size to 20. |
| src/go/plugin/go.d/collector/snmp/collector_test.go | Updates test config helper to reflect the new default MaxOIDs. |
| src/go/plugin/go.d/collector/snmp/collector.go | Updates runtime default MaxOIDs to 20. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
…r fallback (netdata#22203) (cherry picked from commit 537fd8a)
| Back | FazBrowse Home | New Git URL |
Summary
Test Plan
Additional Information
For users: How does this change affect me?Summary by cubic
Reduced SNMP GET batch size and enforced 64-bit IF-MIB counters to improve polling reliability and prevent counter overflows.
Bug Fixes
Migration
Written for commit 617916b. Summary will update on new commits.