-
Notifications
You must be signed in to change notification settings - Fork 773
Refactor exporter so that it can be used as a library. #157
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
Conversation
a01eb4d
to
a39a0b8
Compare
I like this commit. I'll refactor it in the next few days to fit the new repository structure just rolled out, but great work! |
This didn't actually need all that much change, it fits perfectly.
This didn't actually need all that much change, it fits perfectly.
Okay so looking into this further, I'm merging the overall idea but it's very conditional - it's a supremely hacky way to use it as a library and should be regarded as unstable. The interface is going to be aggressively changed in the near future to factor out all the global variables which make it pretty unsafe to use as is. |
This didn't actually need all that much change, it fits perfectly.
@wrouesnel, sounds good to me with your caveat. For now we are vendoring. Looking forward to stable state. |
@wrouesnel friendly ping for any update on this. |
Working on it. There's a fair bit of refactoring to make it sensible (and to support multiple exporter instances sanely). I'm also pulling the built-in queries out to a YAML file format so everything can be overridden. |
What am I saying? This Github! - the work libraryize work is happening on this branch here: https://github.com/wrouesnel/postgres_exporter/tree/libraryize_mk2 |
@wrouesnel, wondering what are the plans on this one. |
@wrouesnel any update on this? This would be an awesome feature to monitor multiple Postgres instances using a single exporter. Appreciate your efforts, thank you! |
We are using the Postgres exported in our project as a library. This pr refactors the exporter to a
collector
subpackage so that it can be used as a library.