Skip to content

Commit

Permalink
address reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
DStrand1 committed Nov 18, 2024
1 parent d1141c5 commit 4cdcbf3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion plugins/inputs/snmp_trap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ details.
# path = ["/usr/share/snmp/mibs"]
##
## Timeout running snmptranslate command
## Used by the netsnmp translator
## Used by the netsnmp translator only
# timeout = "5s"
## Snmp version; one of "1", "2c" or "3".
# version = "2c"
Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/snmp_trap/sample.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# path = ["/usr/share/snmp/mibs"]
##
## Timeout running snmptranslate command
## Used by the netsnmp translator
## Used by the netsnmp translator only
# timeout = "5s"
## Snmp version; one of "1", "2c" or "3".
# version = "2c"
Expand Down
4 changes: 1 addition & 3 deletions plugins/inputs/snmp_trap/snmp_trap.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ func init() {
return &SnmpTrap{
timeFunc: time.Now,
ServiceAddress: "udp://:162",
Timeout: defaultTimeout,
Path: []string{"/usr/share/snmp/mibs"},
Version: "2c",
}
Expand All @@ -103,9 +104,6 @@ func (s *SnmpTrap) Init() error {
return err
}
case "netsnmp":
if s.Timeout == 0 {
s.Timeout = defaultTimeout
}
s.transl = newNetsnmpTranslator(s.Timeout)
default:
return errors.New("invalid translator value")
Expand Down

0 comments on commit 4cdcbf3

Please sign in to comment.