diff --git a/jobs/mysqld_exporter/spec b/jobs/mysqld_exporter/spec index 89c4774a..66e59168 100644 --- a/jobs/mysqld_exporter/spec +++ b/jobs/mysqld_exporter/spec @@ -46,6 +46,8 @@ properties: description: "Collect metrics from information_schema.tables" mysqld_exporter.collect.info_schema.tables_databases: description: "The list of databases to collect table stats for, or '*' for all" + mysqld_exporter.collect.info_schema.schemastats: + description: "If running with userstat=1, set to true to collect schema statistics" mysqld_exporter.collect.info_schema.tablestats: description: "If running with userstat=1, set to true to collect table statistics" mysqld_exporter.collect.info_schema.userstats: diff --git a/jobs/mysqld_exporter/templates/bin/mysqld_exporter_ctl b/jobs/mysqld_exporter/templates/bin/mysqld_exporter_ctl index a75623ae..f4983c3a 100644 --- a/jobs/mysqld_exporter/templates/bin/mysqld_exporter_ctl +++ b/jobs/mysqld_exporter/templates/bin/mysqld_exporter_ctl @@ -86,6 +86,9 @@ case $1 in <% if_p('mysqld_exporter.collect.info_schema.tables_databases') do |tables_databases| %> \ --collect.info_schema.tables.databases="<%= tables_databases %>" \ <% end %> \ + <% if_p('mysqld_exporter.collect.info_schema.schemastats') do |enabled| %> \ + <%= enabled ? "--collect.info_schema.schemastats" : "--no-collect.info_schema.schemastats" %> \ + <% end %> \ <% if_p('mysqld_exporter.collect.info_schema.tablestats') do |enabled| %> \ <%= enabled ? "--collect.info_schema.tablestats" : "--no-collect.info_schema.tablestats" %> \ <% end %> \