-
Notifications
You must be signed in to change notification settings - Fork 795
skip SPACE_TYPE column for MariaDB >=10.5 #724
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
- to be able to scrape information_schema.innodb_sys_tablespaces - https://jira.mariadb.org/browse/MDEV-19940 Signed-off-by: Birk Bohne <[email protected]>
- to avoid panic errors with invalid version numbers - unit test added Signed-off-by: Birk Bohne <[email protected]>
- to be able to validate code with and without SPACE_TYPE column - version query skipped if running inside test Signed-off-by: Birk Bohne <[email protected]>
@businessbean Can I do anything to help get this into main? |
Hi @firecow , you should filter these logs already on Logstash level 😄 I will update the PR today... |
@businessbean Nice, thanks man.. |
|
||
// Scrape collects data from database connection and sends it over channel as prometheus metric. | ||
func (ScrapeBinlogSize) Scrape(ctx context.Context, db *sql.DB, ch chan<- prometheus.Metric, logger log.Logger) error { | ||
func (ScrapeBinlogSize) Scrape(ctx context.Context, db *sql.DB, ch chan<- prometheus.Metric, logger log.Logger, semanticVersionIsNewer bool) error { |
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.
This semanticVersionIsNewer
is not a good way to handle this. It's too specific to one collector, and hard-codes it as a flag for every collector.
What we probably want is to do something like we did in the postgres_expoter, which is to make the db
instance include both a database connection and a semver that each collector can access.
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.
Do you have a link to the related code?
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.
Here's the PR: prometheus-community/postgres_exporter#785
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.
I would prefer to do that refactoring as a separate PR.
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.
I will look into this, but it will take some time...
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.
I created a PR with that refactoring #859
Signed-off-by: Birk Bohne <[email protected]>
is there any chance to merge it? 🙂 or is it waiting for the refactor? can I help with some testing, rebasing or coding? It's not exactly clear to me what blocked the merge 🙂 |
hello @SuperQ are you still working on this repo? It would be useful for us to merge it. I can do some changes if needed. We are currently making custom build for this library because of this |
@SuperQ Yeah, we are running a custom build as well. |
Thanks to @s10 for doing the refactoring! Sorry for the lack of activity here, I don't have a ton of time to maintain MySQL stuff since I haven't really worked on MySQL databases since 2017. It would be great if we could get more community involvement here. |
Fixed in #860 |
Hi @SuperQ,
this PR skips the
SPACE_TYPE
column for MariaDB server instances with version10.5
or newer.information_schema.innodb_sys_tablespaces
tablesbuild environment
make build
unit test results
MariaDB test results
10.4.28
10.5.18