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
Add support for timeout offset #647
Conversation
Allow the MongoDB timeout to be configured relative to the Prometheus scrape timeout. This ensures the Prometheus scrape will get a response even if the exporter cannot connect to MongoDB.
@mikael-lindstrom could you please update your branch? |
@BupycHuk Updated the branch now 👍 |
@mikael-lindstrom Looks good. Could you also add check when TimeoutOffset is 0 or less? And just show error message. Thank you. |
Head branch was pushed to by a user without write access
854248e
to
aa7e9f7
Compare
I resolved the conflicts and added a check for TimeoutOffset being greater than 0. I also changed the name for the flag from I pushed the latest commit 6 hours ago but for some reason this PR shows "Processing updates". Not sure why but the changes are in my branch. |
@mikael-lindstrom Could you try to push it once more? Maybe try add just empty commit. Thank you. |
@JiriCtvrtka Seems to have worked with an empty commit 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job, thank you.
Allow the MongoDB timeout to be configured relative to the Prometheus scrape timeout. This ensures the Prometheus scrape will get a response even if the exporter cannot connect to MongoDB. Implementation is based on how its done in the blackbox_exporter. This in combination with #624 makes the mongodb_exporter return
mongodb_up 0
when it cannot connect to MongoDB.I have not been able to verify that
TestGetEncryptionInfo
pass since I cannot getpercona/percona-server-mongodb:5.0.13-1
to start on my M1 Mac (regardless if I use docker-compose or start the image directly). All other tests pass.Once all checks pass and the code is ready for review, please add
pmm-review-exporters
team as the reviewer. That would assign people from the review team automatically. Report any issues on our Forum or Discord.