Continous restart in Telegraf when an output (kafka) is not reachable

Continous restart in Telegraf when an output (kafka or elasticsearch or any ) is not reachable, the servicekeeps restarting over and over.
It is right, one of the outputs configured is down, in this case is Kafka, but is this a reason for telegraf to restart so many times?
Telegraf log
2019-04-15T15:06:13Z E! Failed to connect to output kafka, retrying in 15s, error was ‘kafka: client has run out of available brokers to talk to (Is your cluster reachable?)’
2019-04-15T15:06:28Z E! kafka: client has run out of available brokers to talk to (Is your cluster reachable?)

Journal log

Apr 15 14:42:05 agent-30 systemd[1]: telegraf.service holdoff time over, scheduling restart.
Apr 15 14:42:22 agent-30 systemd[1]: telegraf.service: main process exited, code=exited, status=1/FAILURE
Apr 15 14:42:22 agent-30 systemd[1]: Unit telegraf.service entered failed state.
Apr 15 14:42:22 agent-30 systemd[1]: telegraf.service failed.
Apr 15 14:42:22 agent-30 systemd[1]: telegraf.service holdoff time over, scheduling restart.
Apr 15 14:42:39 agent-30 systemd[1]: telegraf.service: main process exited, code=exited, status=1/FAILURE
Apr 15 14:42:39 agent-30 systemd[1]: Unit telegraf.service entered failed state.
Apr 15 14:42:39 agent-30 systemd[1]: telegraf.service failed.
Apr 15 14:42:39 agent-30 systemd[1]: telegraf.service holdoff time over, scheduling restart.

Version telegraf-1.6.4-1
Any idea

Have you tried with a newer version of Telegraf? Current is 1.10.2.

Also, can you include the telegraf logs, check your telegraf config to confirm their location. If logging is disabled, please enable them and post them here.

Thanks

This is a known/expected issue, currently all outputs must be available before Telegraf will start. Keep an eye on this issue for updates.

1 Like