feat: deprecate unused snmp_trap timeout configuration option (#10339)

This commit is contained in:
Thomas Casteleyn 2022-01-10 15:44:53 +01:00 committed by GitHub
parent 78db30cade
commit 7f20e7103f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 7 deletions

View File

@ -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"`
@ -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.
@ -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",
}