We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4082e7d commit db403b9Copy full SHA for db403b9
plugins/inputs/redis/redis.go
@@ -18,7 +18,8 @@ import (
18
)
19
20
type Redis struct {
21
- Servers []string
+ Servers []string
22
+ Password string
23
tls.ClientConfig
24
25
clients []Client
@@ -59,6 +60,9 @@ var sampleConfig = `
59
60
## If no port is specified, 6379 is used
61
servers = ["tcp://localhost:6379"]
62
63
+ ## specify server password
64
+ # password = "s#cr@t%"
65
+
66
## Optional TLS Config
67
# tls_ca = "/etc/telegraf/ca.pem"
68
# tls_cert = "/etc/telegraf/cert.pem"
@@ -110,6 +114,9 @@ func (r *Redis) init(acc telegraf.Accumulator) error {
110
114
password = pw
111
115
}
112
116
117
+ if len(r.Password) > 0 {
118
+ password = r.Password
119
+ }
113
120
121
var address string
122
if u.Scheme == "unix" {
0 commit comments