a little fix to Seq Page Cost metrics on dashboard
template variables narrowing
Seq Page Cost
In case, when you provide kubernetes_namespace and release labels, you can specify template variables and adjust the vaules on the dashboard. But the Seq Page Cost metric will be shown incorrectly (see the picture)
If you take a look at the query for that counter, it:
Therefore the query must be corrected, like other other counters:
pg_settings_seq_page_cost{instance="$instance"}
Dashboard after the change:
Template variables narrowing
If you take a look at template variables, you may notice datname and mode variables don't respect other template variables.
E.g. you have two PostgreSQL exporters scrapping different databases. If you specificy namespace, release and instance, then you expect to see only databases exported by the concrete exporter. However you will still see all databases in datname filter as well as in mode.
The idea is to make datname and mode dependent on namespace, release and instance
Description
The PR consists of two parts:
Seq Page Cost
In case, when you provide
kubernetes_namespace
andrelease
labels, you can specify template variables and adjust the vaules on the dashboard. But theSeq Page Cost
metric will be shown incorrectly (see the picture)If you take a look at the query for that counter, it:
pg_settings_seq_page_cost
While for others in the row is:
pg_settings_max_wal_size_bytes{instance="$instance"}
Therefore the query must be corrected, like other other counters:
pg_settings_seq_page_cost{instance="$instance"}
Dashboard after the change:
Template variables narrowing
If you take a look at template variables, you may notice
datname
andmode
variables don't respect other template variables.E.g. you have two PostgreSQL exporters scrapping different databases. If you specificy
namespace
,release
andinstance
, then you expect to see only databases exported by the concrete exporter. However you will still see all databases indatname
filter as well as inmode
.The idea is to make
datname
andmode
dependent onnamespace
,release
andinstance