@cryptotaxi247 / netdata-1 / commits / e6bd1fdf8

fix(go.d/snmp): fix retries serialization and bulk walk disable (#22179)

Ilya Mashchenko committed Apr 10, 2026 at 14:09 UTC e6bd1fdf89c76a04569a9382b56ed923f4abfdb1
2 files changed +6 -1
src/go/plugin/go.d/collector/snmp/collect.go
+5
@@ -231,6 +231,11 @@ func (c *Collector) initAndConnectSNMPClient() (gosnmp.Handler, error) {
231 return snmpClient, nil
232 }
233
234 + if c.Config.Options.MaxRepetitions == 0 {
235 + c.disableBulkWalk = true
236 + return snmpClient, nil
237 + }
238 +
239 if c.adjMaxRepetitions != 0 {
240 snmpClient.SetMaxRepetitions(c.adjMaxRepetitions)
241 } else {
src/go/plugin/go.d/collector/snmp/config.go
+1 -1
@@ -41,7 +41,7 @@ type (
41 }
42 OptionsConfig struct {
43 Port int `yaml:"port,omitempty" json:"port"`
44 - Retries int `yaml:"retries,omitempty" json:"retries"`
44 + Retries int `yaml:"retries" json:"retries"`
45 Timeout int `yaml:"timeout,omitempty" json:"timeout"`
46 Version string `yaml:"version,omitempty" json:"version"`
47 MaxOIDs int `yaml:"max_request_size,omitempty" json:"max_request_size"`