Skip to content

Conversation

sysadmind
Copy link
Contributor

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.

@sysadmind sysadmind requested a review from SuperQ March 30, 2023 01:27
@sysadmind
Copy link
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.

@SuperQ
Copy link
Contributor

SuperQ commented Jun 19, 2023

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>
@sysadmind sysadmind force-pushed the collector-instance branch from 2a89b67 to ab33346 Compare June 22, 2023 00:37
@sysadmind
Copy link
Contributor Author

@SuperQ Rebase complete.

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)
Copy link
Contributor

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?

Copy link
Contributor

@SuperQ SuperQ left a 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.

@SuperQ
Copy link
Contributor

SuperQ commented Jun 22, 2023

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.

@SuperQ SuperQ merged commit d983d32 into prometheus-community:master Jun 22, 2023
@sysadmind sysadmind deleted the collector-instance branch June 28, 2023 23:52
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants