-
Notifications
You must be signed in to change notification settings - Fork 5.8k
gather_innodb_metrics fails on MariaDB 10.5.4+ #7968
Copy link
Copy link
Closed
Labels
Description
Relevant telegraf.conf:
[[inputs.mysql]]
gather_innodb_metrics = trueSystem info:
- Linux 3.10.0-1127.18.2.el7.x86_64
- MariaDB-server-10.5.4-1.el7.centos.x86_64
Steps to reproduce:
- Enable gather InnoDB metrics in Telegraf's inputs_mysql.conf plugin (
gather_innodb_metrics = true) - Restart Telegraf
Expected behaviour:
MySQL/MariaDB metrics successfully collected.
Actual behavior:
The following error will be reported:
E! [inputs.mysql] Error in plugin: Error 1054: Unknown column 'status' in 'where clause'
Additional info:
The problem is the following query in the mysql plugin:
innoDBMetricsQuery = `
SELECT NAME, COUNT
FROM information_schema.INNODB_METRICS
WHERE status='enabled'
`The status column has changed in recent versions of MariaDB (not sure if it's the same for MySQL). The correct query should be:
innoDBMetricsQuery = `
SELECT NAME, COUNT
FROM information_schema.INNODB_METRICS
WHERE ENABLED=1;
`Reactions are currently unavailable