From d9c64a29ffcaa64f0f401f2c4c9905fd680be69d Mon Sep 17 00:00:00 2001 From: Pierre Fersing Date: Tue, 19 Jul 2016 16:06:40 +0200 Subject: [PATCH] Fix Redis url, an extra "tcp://" was added --- CHANGELOG.md | 1 + plugins/inputs/redis/redis.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 76263dc69eb7c..7d97b48028c94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -76,6 +76,7 @@ should now look like: - [#1436](https://github.com/influxdata/telegraf/issues/1436): logparser: honor modifiers in "pattern" config. - [#1418](https://github.com/influxdata/telegraf/issues/1418): logparser: error and exit on file permissions/missing errors. - [#1499](https://github.com/influxdata/telegraf/pull/1499): Make the user able to specify full path for HAproxy stats +- [#1521](https://github.com/influxdata/telegraf/pull/1521): Fix Redis url, an extra "tcp://" was added. ## v1.0 beta 2 [2016-06-21] diff --git a/plugins/inputs/redis/redis.go b/plugins/inputs/redis/redis.go index 649786c2c4e56..b08eedee320d2 100644 --- a/plugins/inputs/redis/redis.go +++ b/plugins/inputs/redis/redis.go @@ -99,7 +99,7 @@ func (r *Redis) Gather(acc telegraf.Accumulator) error { var wg sync.WaitGroup errChan := errchan.New(len(r.Servers)) for _, serv := range r.Servers { - if !strings.HasPrefix(serv, "tcp://") || !strings.HasPrefix(serv, "unix://") { + if !strings.HasPrefix(serv, "tcp://") && !strings.HasPrefix(serv, "unix://") { serv = "tcp://" + serv }