From c97c1f941cc52a6ec79af4dba385f4e15130706e Mon Sep 17 00:00:00 2001 From: Sheogorath <sheogorath@shivering-isles.com> Date: Sun, 24 Apr 2022 23:40:39 +0200 Subject: [PATCH] fix(postgres-system): fix unexpected behaviour difference This patch fixes the unexpected change in bahaviour. When using a namespace selector that selects one or multiple namespaces, there will be two labels. `namespace`, where the podMonitor lives, and `exported_namespace`, where the target pods is. When using a podMonitor that scans any namespace, there is only a `namespace` label. --- infrastructure/postgres/dashboards/postgresql-database.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/infrastructure/postgres/dashboards/postgresql-database.json b/infrastructure/postgres/dashboards/postgresql-database.json index f782542ba..33104acaa 100644 --- a/infrastructure/postgres/dashboards/postgresql-database.json +++ b/infrastructure/postgres/dashboards/postgresql-database.json @@ -3032,7 +3032,7 @@ "options": [], "query": "query_result(pg_exporter_last_scrape_duration_seconds)", "refresh": 2, - "regex": "/.*exported_namespace=\"([^\"]+).*/", + "regex": "/.*namespace=\"([^\"]+).*/", "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", @@ -3052,7 +3052,7 @@ "multi": false, "name": "release", "options": [], - "query": "query_result(pg_exporter_last_scrape_duration_seconds{exported_namespace=\"$namespace\"})", + "query": "query_result(pg_exporter_last_scrape_duration_seconds{namespace=\"$namespace\"})", "refresh": 2, "regex": "/.*cluster_name=\"([^\"]+)/", "skipUrlSync": false, -- GitLab