Add the instance struct to handle connections#785
Merged
SuperQ merged 1 commit intoprometheus-community:masterfrom Jun 22, 2023
Merged
Add the instance struct to handle connections#785SuperQ merged 1 commit intoprometheus-community:masterfrom
SuperQ merged 1 commit intoprometheus-community:masterfrom
Conversation
Contributor
Author
|
@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. |
Contributor
|
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 <github@joeadams.io>
2a89b67 to
ab33346
Compare
Contributor
Author
|
@SuperQ Rebase complete. |
SuperQ
reviewed
Jun 22, 2023
Comment on lines
+74
to
+75
| // 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) |
Contributor
There was a problem hiding this comment.
Maybe we should do SHOW server_version first?
SuperQ
approved these changes
Jun 22, 2023
Contributor
SuperQ
left a comment
There was a problem hiding this comment.
Minor question about version parsing order. Otherwise LGTM.
Contributor
|
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. |
s10
added a commit
to s10/mysqld_exporter
that referenced
this pull request
Aug 12, 2024
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
s10
added a commit
to s10/mysqld_exporter
that referenced
this pull request
Aug 12, 2024
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
s10
added a commit
to s10/mysqld_exporter
that referenced
this pull request
Aug 12, 2024
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
s10
added a commit
to s10/mysqld_exporter
that referenced
this pull request
Aug 12, 2024
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 <vlad.esten@gmail.com>
s10
added a commit
to s10/mysqld_exporter
that referenced
this pull request
Aug 12, 2024
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 <vlad.esten@gmail.com>
SuperQ
pushed a commit
to prometheus/mysqld_exporter
that referenced
this pull request
Aug 12, 2024
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 <vlad.esten@gmail.com>
ademidoff
added a commit
to percona/mysqld_exporter
that referenced
this pull request
Mar 13, 2025
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 <vlad.esten@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.