Skip to content

Commit

Permalink
Support more snmpv3 authentication protocols (influxdata#8850)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hipska authored Feb 24, 2021
1 parent 58dd50c commit 47e12d1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions internal/snmp/wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,14 @@ func NewWrapper(s ClientConfig) (GosnmpWrapper, error) {
sp.AuthenticationProtocol = gosnmp.MD5
case "sha":
sp.AuthenticationProtocol = gosnmp.SHA
case "sha224":
sp.AuthenticationProtocol = gosnmp.SHA224
case "sha256":
sp.AuthenticationProtocol = gosnmp.SHA256
case "sha384":
sp.AuthenticationProtocol = gosnmp.SHA384
case "sha512":
sp.AuthenticationProtocol = gosnmp.SHA512
case "":
sp.AuthenticationProtocol = gosnmp.NoAuth
default:
Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/snmp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ information.
##
## Security Name.
# sec_name = "myuser"
## Authentication protocol; one of "MD5", "SHA", or "".
## Authentication protocol; one of "MD5", "SHA", "SHA224", "SHA256", "SHA384", "SHA512" or "".
# auth_protocol = "MD5"
## Authentication password.
# auth_password = "pass"
Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/snmp/snmp.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const sampleConfig = `
##
## Security Name.
# sec_name = "myuser"
## Authentication protocol; one of "MD5", "SHA", or "".
## Authentication protocol; one of "MD5", "SHA", "SHA224", "SHA256", "SHA384", "SHA512" or "".
# auth_protocol = "MD5"
## Authentication password.
# auth_password = "pass"
Expand Down

0 comments on commit 47e12d1

Please sign in to comment.