-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
gather_innodb_metrics fails on MariaDB 10.5.4+ #7968
Comments
Hmm. What do you think the correct behavior should be? Check to see which column the INNODB_METRICS table has, first? Or base it off of db and version numbers (which might be a bit harder to get right, but potentially faster). |
Good question! Yes, you could simply check if the INNODB_METRICS has the ENABLED column - if yes, adapt the WHERE criteria to the new query; otherwise run the old WHERE clause. The DB version is a bit more tricky IMO, because I don't know exactly in which MariaDB version this was changed, if the same change will happen on MySQL forks and others... But this solution still implies 2 queries on each metric collection: one to check which column exists, and a second query to collect the data, which for very intensive Telegraf collection metrics might become very inefficient (unless you can cache the results of the first query). If you can't cache the results, a better solution would be to add a new configuration directive. Something like this:
If you don't like my config directive naming feel free to use a different one. But you get the idea ;-) What do you think? |
You could only do this check once and remember the result until Telegraf restarts. Seems fairly reasonable. This way the amortized cost is nearly zero, and there's no additional configuration to get wrong. |
Yes, that's what I meant with caching the results. If you can easily do this in the plugin (I don't know Telegraf's plugin architecture), then I'd say it's the best solution. |
Yep, definitely. It could check this on startup or first gather |
Hi, just checking up on this one. I've found that even the latest 1.18.x telegraf is still having issues with MariaDB 10.5.x and gathering innodb metrics. |
Hello, I'm too affected by the same issue with gathering innodb metrics. I can't really help much with development, but I can help with testing the fix across numerous Maria 10.5.x servers. |
So after one year still no solution for this problem? we now have the mariadb_dialect = true for the slave, a similar option (say mariadb_innodb_new_format = true) could be added to switch the query format, a quick and sure fix |
Hello. I confirm this bug for MariaDB version 10.6 as well. E! [inputs.mysql] Error in plugin: Error 1054: Unknown column 'status' in 'where clause'
The Both version 1 and version 2 metrics are affected. The same error for both
@ssoroka Could this be given a higher priority? Are there any chances any "hotfix" is released soon, please? Also see MDEV-19940. The field I suggest to fix it for |
Hi, i tested the PR with MariaDB 10.5, 10.6, 10.7 and 10.8. |
Relevant telegraf.conf:
System info:
Steps to reproduce:
gather_innodb_metrics = true
)Expected behaviour:
MySQL/MariaDB metrics successfully collected.
Actual behavior:
The following error will be reported:
Additional info:
The problem is the following query in the mysql plugin:
The status column has changed in recent versions of MariaDB (not sure if it's the same for MySQL). The correct query should be:
The text was updated successfully, but these errors were encountered: