-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Amqp consumer connection fail #13746
Comments
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, |
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 |
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
2023-08-09T20:53:22Z D! [agent] Starting service inputs
2023-08-09T20:53:22Z D! [inputs.amqp_consumer] Connecting to "amqp://localhost:5672"
2023-08-09T20:53:23Z D! [inputs.amqp_consumer] Error connecting to "amqp://localhost:5672"
...
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.
The text was updated successfully, but these errors were encountered: