-
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
[inputs.mongodb] Telegraf crash on init if conn to MongoDB fails #10078
Comments
Hi, I want to be certain I understand your desire for this bug. Are you after more log messages? The message you provided shows that it failed to connect to MongoDB already. Are you hoping for some sort of retry? Or something else? Thanks! |
Thanks for your feedback and sorry if it was unclear,
Yes, but since the error is returned in the From that state, lets imagine I have other metrics collected (lets say from other inputs for example). If one of the MongoDB servers listed is not reachable for some reason, I want Telegraf to continue running and collect metrics from other inputs. I see to solution (the simple one [1] and the complex one [2]):
or
(I am currently working on code for solution [2]) |
See #10086 for implementation details and discussion. |
Can you please provide some feedback about the PR ? Thanks ❤️ |
Relevent telegraf.conf
/etc/telegraf/telegraf.d/mongo.conf
System info
Telegraf 1.20.2 (git: HEAD f721f53), Debian 10.11
Docker
No response
Steps to reproduce
Expected behavior
At least a log message to STDERR, on init, about a failing conn to a MongoDB server (with no retry mechanism)
Actual behavior
Telegraf crashes :
Additional info
My hypothesis is that we need to rethink some logic in the Init function in the mongodb input code
The text was updated successfully, but these errors were encountered: