Closed matteoberts closed 3 months ago
Hi,
Happy to see a PR which adds a config option added to the plugin that enables retries, such as:
## Specifies plugin behavior regarding disconnected servers
## Available choices :
## - error: telegraf will return an error on startup if one the servers is unreachable
## - ignore: telegraf will ignore unreachable servers on both startup and gather
# disconnected_servers_behavior = "error"
Hi @powersj,
Thanks a lot for the feedback! I'm glad to see the addition of the new config option to the plugin, it's a great enhancement.
I had a question regarding the PR: will there be a connection retry mechanism included to handle the scenario we discussed? Or is there a different approach planned for handling it? I'm curious to know how this will be addressed.
Looking forward to hearing more about it. Thanks again for your work on this!
Regards, Matteo
Yes - whoever adds this could add another option like "retry" where the plugin could retry the connection at each interval.
@matteoberts could you please try the binary in PR #15145 with startup_error_behavior = "retry"
and let me know if this is the behavior you want!?!?
@matteoberts could you please try the binary in PR #15145 with
startup_error_behavior = "retry"
and let me know if this is the behavior you want!?!?
Hi @srebhan ,
Sorry for the late reply. I've tested it and it worked pretty well. Thank you very much for the support!
Relevant telegraf.conf
Logs from Telegraf
System info
Telegraf 1.26.3, Windows Server 2019
Docker
No response
Steps to reproduce
Expected behavior
In case of Telegraf fails to connect to AMQP broker, it should perform some retries
Actual behavior
No connection retry is performed based on the error described. A manual restart of Telegraf has to be performed in order to re-establish the connection
Additional info
I can't find a configuration for connection retries/backoff based on described error scenario. In case of Telegraf can't establish a connection to RabbitMQ via the input amqp_consumer plugin there should be a way to perform retries.