prometheus / mysqld_exporter

Exporter for MySQL server metrics
http://prometheus.io/
Apache License 2.0
2.12k stars 745 forks source link

Feature request: expose metrics from mysql.innodb_index_stats #389

Open guidoiaquinti opened 5 years ago

guidoiaquinti commented 5 years ago

It could be nice to have mysqld_exporter exposing InnoDB index stats metrics.

Example:

mysql> SELECT * FROM innodb_table_stats \G
*************************** 1. row ***************************
           database_name: sakila
              table_name: actor
             last_update: 2014-05-28 16:16:44
                  n_rows: 200
    clustered_index_size: 1
sum_of_other_index_sizes: 1
mysql> SELECT * FROM innodb_index_stats \G
*************************** 1. row ***************************
   database_name: sakila
      table_name: actor
      index_name: PRIMARY
     last_update: 2014-05-28 16:16:44
       stat_name: n_diff_pfx01
      stat_value: 200
     sample_size: 1
     ...
matlegit commented 4 years ago

Hi @guidoiaquinti , do you know if this was ever implemented? We're interested in table index size as well

guidoiaquinti commented 4 years ago

From what I can see in the codebase the answer is: no

pgporada commented 3 years ago

@matlegit, I've put up a PR which should provide these stats. Here's hoping it gets reviewed in a timely manner!