-
Notifications
You must be signed in to change notification settings - Fork 761
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 the instance struct to handle connections #785
Add the instance struct to handle connections #785
Conversation
@SuperQ Let me know what you think about this. This was my first iteration but it seems like it should work for versioning queries in the collector package. |
Seems like a good idea, care to rebase this? |
The intent is to use the instance struct to hold the connection to the database as well as metadata about the instance. Currently this metadata only includes the version of postgres for the instance which can be used in the collectors to decide what query to run. In the future this could hold more metadata but for now it keeps the Collector interface arguments to a reasonable number. Signed-off-by: Joe Adams <[email protected]>
2a89b67
to
ab33346
Compare
@SuperQ Rebase complete. |
// We could also try to parse the version from the server_version field. | ||
// This is of the format 13.3 (Debian 13.3-1.pgdg100+1) |
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.
Maybe we should do SHOW server_version
first?
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.
Minor question about version parsing order. Otherwise LGTM.
I think the version stuff is fine for now, we can iterate on it later. I'm going to merge this so I can continue some migrations of collectors out of the main package. |
The intent is to use the instance struct to hold the connection to the database as well as metadata about the instance Change is similar to prometheus-community/postgres_exporter#785
The intent is to use the instance struct to hold the connection to the database as well as metadata about the instance Change is similar to prometheus-community/postgres_exporter#785
The intent is to use the instance struct to hold the connection to the database as well as metadata about the instance: - version - flavor (mariadb or mysql) Change is similar to prometheus-community/postgres_exporter#785
The intent is to use the instance struct to hold the connection to the database as well as metadata about the instance: - version - flavor (mariadb or mysql) Change is similar to prometheus-community/postgres_exporter#785 Signed-off-by: Vlad Gusev <[email protected]>
The intent is to use the instance struct to hold the connection to the database as well as metadata about the instance: - version - flavor (mariadb or mysql) Change is similar to prometheus-community/postgres_exporter#785 Signed-off-by: Vlad Gusev <[email protected]>
The intent is to use the instance struct to hold the connection to the database as well as metadata about the instance: - version - flavor (mariadb or mysql) Change is similar to prometheus-community/postgres_exporter#785 Signed-off-by: Vlad Gusev <[email protected]>
The intent is to use the instance struct to hold the connection to the database as well as metadata about the instance. Currently this metadata only includes the version of postgres for the instance which can be used in the collectors to decide what query to run. In the future this could hold more metadata but for now it keeps the Collector interface arguments to a reasonable number.