From d4d577e7ff85d41627a340fd8480e11370b1b854 Mon Sep 17 00:00:00 2001 From: Arseny Sher Date: Thu, 16 Nov 2023 22:42:08 +0100 Subject: [PATCH] Add query to pg_wait_sampling metric --- vm-image-spec.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vm-image-spec.yaml b/vm-image-spec.yaml index 378e9778c6..74ff1a4843 100644 --- a/vm-image-spec.yaml +++ b/vm-image-spec.yaml @@ -49,7 +49,7 @@ files: - filename: postgres_exporter_queries.yml content: | pg_wait_sampling: - query: "select pid, event_type, event, queryid, count from pg_wait_sampling_profile" + query: "select pid, event_type, event, w.queryid as queryid, query, count from pg_wait_sampling_profile w join pg_stat_statements s on w.queryid = s.queryid;" cache_seconds: 30 metrics: - pid: @@ -64,6 +64,9 @@ files: - queryid: usage: "LABEL" description: "queryid" + - query: + usage: "LABEL" + description: "query" - count: usage: "GAUGE" description: "count"