Skip to content

Commit

Permalink
feat: deprecate unused snmp_trap timeout configuration option (influx…
Browse files Browse the repository at this point in the history
  • Loading branch information
Hipska authored and powersj committed Jan 21, 2022
1 parent 0c151ad commit 34c958f
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions plugins/inputs/snmp_trap/snmp_trap.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ import (
"github.com/gosnmp/gosnmp"
)

var defaultTimeout = config.Duration(time.Second * 5)

type SnmpTrap struct {
ServiceAddress string `toml:"service_address"`
Timeout config.Duration `toml:"timeout"`
Timeout config.Duration `toml:"timeout" deprecated:"1.20.0;unused option"`
Version string `toml:"version"`
Path []string `toml:"path"`

Expand Down Expand Up @@ -58,9 +56,6 @@ var sampleConfig = `
## Path to mib files
# path = ["/usr/share/snmp/mibs"]
##
## Deprecated in 1.20.0; no longer running snmptranslate
## Timeout running snmptranslate command
# timeout = "5s"
## Snmp version, defaults to 2c
# version = "2c"
## SNMPv3 authentication and encryption options.
Expand Down Expand Up @@ -97,7 +92,6 @@ func init() {
timeFunc: time.Now,
lookupFunc: snmp.TrapLookup,
ServiceAddress: "udp://:162",
Timeout: defaultTimeout,
Path: []string{"/usr/share/snmp/mibs"},
Version: "2c",
}
Expand Down

0 comments on commit 34c958f

Please sign in to comment.