Skip to content

Commit 42d9d5d

Browse files
PierreFsparrc
authored andcommitted
Fix Redis url, an extra "tcp://" was added (#1521)
1 parent d54b169 commit 42d9d5d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ should now look like:
7777
- [#1436](https://github.com/influxdata/telegraf/issues/1436): logparser: honor modifiers in "pattern" config.
7878
- [#1418](https://github.com/influxdata/telegraf/issues/1418): logparser: error and exit on file permissions/missing errors.
7979
- [#1499](https://github.com/influxdata/telegraf/pull/1499): Make the user able to specify full path for HAproxy stats
80+
- [#1521](https://github.com/influxdata/telegraf/pull/1521): Fix Redis url, an extra "tcp://" was added.
8081

8182
## v1.0 beta 2 [2016-06-21]
8283

plugins/inputs/redis/redis.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func (r *Redis) Gather(acc telegraf.Accumulator) error {
9999
var wg sync.WaitGroup
100100
errChan := errchan.New(len(r.Servers))
101101
for _, serv := range r.Servers {
102-
if !strings.HasPrefix(serv, "tcp://") || !strings.HasPrefix(serv, "unix://") {
102+
if !strings.HasPrefix(serv, "tcp://") && !strings.HasPrefix(serv, "unix://") {
103103
serv = "tcp://" + serv
104104
}
105105

0 commit comments

Comments
 (0)