diff --git a/CHANGELOG.md b/CHANGELOG.md index e261a0ec7..dc566bb9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ a naming consistency issue, so cpu_percentageIdle will become cpu_usage_idle - [#181](https://github.com/influxdb/telegraf/issues/181): Makefile GOBIN support. Thanks @Vye! - [#203](https://github.com/influxdb/telegraf/pull/200): AMQP output. Thanks @ekini! - [#182](https://github.com/influxdb/telegraf/pull/182): OpenTSDB output. Thanks @rplessl! +- [#187](https://github.com/influxdb/telegraf/pull/187): Retry output sink connections on startup. ### Bugfixes - [#170](https://github.com/influxdb/telegraf/issues/170): Systemd support diff --git a/agent.go b/agent.go index 12533d286..e74622457 100644 --- a/agent.go +++ b/agent.go @@ -89,7 +89,12 @@ func (a *Agent) Connect() error { } err := o.output.Connect() if err != nil { - return err + log.Printf("Failed to connect to output %s, retrying in 15s\n", o.name) + time.Sleep(15 * time.Second) + err = o.output.Connect() + if err != nil { + return err + } } if a.Debug { log.Printf("Successfully connected to output: %s\n", o.name)