Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct queries, based on template variables #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Kirkirillka
Copy link

Description

The PR consists of two parts:

  • 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)

image

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:

image

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant