@cryptotaxi247 / netdata-1 / commits / 537fd8a08

fix(go.d/snmp): reduce default MaxOIDs to 20 and remove 32-bit counter fallback (#22203)

Ilya Mashchenko committed Apr 14, 2026 at 08:57 UTC 537fd8a0896c95c72bffec741116b7702aa42b81
4 files changed +23 -39
src/go/plugin/go.d/collector/snmp/collector.go
+1 -1
@@ -47,7 +47,7 @@ func New() *Collector {
47 Retries: 1,
48 Timeout: 5,
49 Version: gosnmp.Version2c.String(),
50 - MaxOIDs: 60,
50 + MaxOIDs: 20,
51 MaxRepetitions: 25,
52 },
53 User: UserConfig{
src/go/plugin/go.d/collector/snmp/collector_test.go
+1 -1
@@ -738,7 +738,7 @@ func prepareV1Config() Config {
738 Retries: 1,
739 Timeout: 5,
740 Version: gosnmp.Version1.String(),
741 - MaxOIDs: 60,
741 + MaxOIDs: 20,
742 MaxRepetitions: 25,
743 },
744 }
src/go/plugin/go.d/collector/snmp/config_schema.json
+1 -1
@@ -117,7 +117,7 @@
117 "description": "The maximum number of OIDs allowed in a single GET request.",
118 "type": "integer",
119 "minimum": 1,
120 - "default": 60
120 + "default": 20
121 }
122 },
123 "required": [
src/go/plugin/go.d/config/go.d/snmp.profiles/default/_std-if-mib.yaml
+20 -36
@@ -20,11 +20,11 @@ metrics:
20 name: ifTable
21 symbols:
22 # 32-bit octets (fallback for traffic)
23 - - { OID: 1.3.6.1.2.1.2.2.1.10, name: _ifInOctets, scale_factor: 8 }
24 - - { OID: 1.3.6.1.2.1.2.2.1.16, name: _ifOutOctets, scale_factor: 8 }
23 + # - { OID: 1.3.6.1.2.1.2.2.1.10, name: _ifInOctets, scale_factor: 8 }
24 + # - { OID: 1.3.6.1.2.1.2.2.1.16, name: _ifOutOctets, scale_factor: 8 }
25 # 32-bit unicast packets (fallback for unicast packet rate)
26 - - { OID: 1.3.6.1.2.1.2.2.1.11, name: _ifInUcastPkts }
27 - - { OID: 1.3.6.1.2.1.2.2.1.17, name: _ifOutUcastPkts }
26 + # - { OID: 1.3.6.1.2.1.2.2.1.11, name: _ifInUcastPkts }
27 + # - { OID: 1.3.6.1.2.1.2.2.1.17, name: _ifOutUcastPkts }
28 # 32-bit only
29 - { OID: 1.3.6.1.2.1.2.2.1.14, name: _ifInErrors }
30 - { OID: 1.3.6.1.2.1.2.2.1.20, name: _ifOutErrors }
@@ -128,29 +128,21 @@ virtual_metrics:
128 # TOTALS (all interfaces)
129 # ======================
130
131 - # Traffic total (prefer 64-bit HC; fallback to 32-bit)
131 + # Traffic total (64-bit HC only)
132 - name: ifTotalTraffic
133 - alternatives:
134 - - sources:
135 - - { metric: _ifHCInOctets, table: ifXTable, as: in }
136 - - { metric: _ifHCOutOctets, table: ifXTable, as: out }
137 - - sources:
138 - - { metric: _ifInOctets, table: ifTable, as: in }
139 - - { metric: _ifOutOctets, table: ifTable, as: out }
133 + sources:
134 + - { metric: _ifHCInOctets, table: ifXTable, as: in }
135 + - { metric: _ifHCOutOctets, table: ifXTable, as: out }
136 chart_meta:
137 description: Total traffic across all interfaces
138 family: 'Network/Total/Traffic'
139 unit: "bit/s"
140
145 - # Unicast packets total (prefer 64-bit HC; fallback to 32-bit)
141 + # Unicast packets total (64-bit HC only)
142 - name: ifTotalPacketsUcast
147 - alternatives:
148 - - sources:
149 - - { metric: _ifHCInUcastPkts, table: ifXTable, as: in }
150 - - { metric: _ifHCOutUcastPkts, table: ifXTable, as: out }
151 - - sources:
152 - - { metric: _ifInUcastPkts, table: ifTable, as: in }
153 - - { metric: _ifOutUcastPkts, table: ifTable, as: out }
143 + sources:
144 + - { metric: _ifHCInUcastPkts, table: ifXTable, as: in }
145 + - { metric: _ifHCOutUcastPkts, table: ifXTable, as: out }
146 chart_meta:
147 description: Total unicast packets across all interfaces
148 family: 'Network/Total/Packet/Unicast'
@@ -209,33 +201,25 @@ virtual_metrics:
201 # PER INTERFACE (per_row)
202 # =========================
203
212 - # Traffic per interface
204 + # Traffic per interface (64-bit HC only)
205 - name: ifTraffic
206 per_row: true
207 group_by: ["interface"]
216 - alternatives:
217 - - sources:
218 - - { metric: _ifHCInOctets, table: ifXTable, as: in }
219 - - { metric: _ifHCOutOctets, table: ifXTable, as: out }
220 - - sources:
221 - - { metric: _ifInOctets, table: ifTable, as: in }
222 - - { metric: _ifOutOctets, table: ifTable, as: out }
208 + sources:
209 + - { metric: _ifHCInOctets, table: ifXTable, as: in }
210 + - { metric: _ifHCOutOctets, table: ifXTable, as: out }
211 chart_meta:
212 description: Traffic
213 family: 'Network/Interface/Traffic/Total'
214 unit: "bit/s"
215
228 - # Unicast packets per interface
216 + # Unicast packets per interface (64-bit HC only)
217 - name: ifPacketsUcast
218 per_row: true
219 group_by: ["interface"]
232 - alternatives:
233 - - sources:
234 - - { metric: _ifHCInUcastPkts, table: ifXTable, as: in }
235 - - { metric: _ifHCOutUcastPkts, table: ifXTable, as: out }
236 - - sources:
237 - - { metric: _ifInUcastPkts, table: ifTable, as: in }
238 - - { metric: _ifOutUcastPkts, table: ifTable, as: out }
220 + sources:
221 + - { metric: _ifHCInUcastPkts, table: ifXTable, as: in }
222 + - { metric: _ifHCOutUcastPkts, table: ifXTable, as: out }
223 chart_meta:
224 description: Unicast packets
225 family: 'Network/Interface/Packet/Unicast'