Omnibus: postgres_exporter['per_table_stats'] setting has no longer an effect with upgrade to 16.2.0

Summary

I have an internal ticket where the customer is having issues with the setting,

postgres_exporter['per_table_stats']

not being applied or have any dicernable affect since upgrading to version 16.2.0.

The customer suspects the following,

I think this issue relates to the postgres_exporter upgrade from 0.11.1 to 0.13.1 in the GitLab Omnibus 16.2.0 release.

Steps to reproduce

Try setting the boolean value for this setting, while on version 16.2.0, to see there is no difference.

What is the current bug behavior?

There doesn't seem to be any application for the setting, postgres_exporter['per_table_stats'] in version 16.2.0

This follows an upgrade from 15.11.12 to 16.2.0

From the customer who reported it:

We now get the following table metrics for the "gitlabhq_production" database, which produce alerts with our defined alerts:

  • pg_stat_user_tables_last_autoanalyze
  • pg_stat_user_tables_last_autovacuum

What is the expected correct behavior?

These metrics should not be exported when "per_table_stats" is set to false: https://gitlab.com/gitlab-org/omnibus-gitlab/-/blob/master/files/gitlab-cookbooks/monitoring/templates/postgres-queries.yaml.erb#L18

Edited by Bo Carbonell