Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion plugins/inputs/redis/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import (
)

type Redis struct {
Servers []string
Servers []string
Password string
tls.ClientConfig

clients []Client
Expand Down Expand Up @@ -59,6 +60,9 @@ var sampleConfig = `
## If no port is specified, 6379 is used
servers = ["tcp://localhost:6379"]

## specify server password
# password = "s#cr@t%"

## Optional TLS Config
# tls_ca = "/etc/telegraf/ca.pem"
# tls_cert = "/etc/telegraf/cert.pem"
Expand Down Expand Up @@ -110,6 +114,9 @@ func (r *Redis) init(acc telegraf.Accumulator) error {
password = pw
}
}
if len(r.Password) > 0 {
password = r.Password
}

var address string
if u.Scheme == "unix" {
Expand Down