You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: config/pgwatch-prometheus/metrics.yml
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -4222,25 +4222,25 @@ metrics:
4222
4222
providing insights into potential bottlenecks and resource contention issues.
4223
4223
sqls:
4224
4224
11:|-
4225
-
SELECT datname as tag_datname, coalesce (wait_event, 'CPU*')|| ' - ' || coalesce(wait_event_type, 'CPU*') as tag_wait_event_type, count(*) as total
4225
+
SELECT datname as tag_datname, coalesce (wait_event, 'CPU*')as tag_wait_event, coalesce(wait_event_type, 'CPU*') as tag_wait_event_type, count(*) as total
4226
4226
FROM pg_stat_activity
4227
4227
WHERE state = 'active'
4228
-
GROUP BY tag_datname, tag_wait_event_type
4228
+
GROUP BY tag_datname, tag_wait_event_type, tag_wait_event
4229
4229
UNION
4230
-
SELECT 'server_process' as tag_datname, coalesce (wait_event, 'CPU*')|| ' - ' || coalesce(wait_event_type, 'CPU*') as tag_wait_event_type, count(*) as total
4230
+
SELECT 'server_process' as tag_datname, coalesce (wait_event, 'CPU*')as tag_wait_event, coalesce(wait_event_type, 'CPU*') as tag_wait_event_type, count(*) as total
4231
4231
FROM pg_stat_activity
4232
4232
WHERE state = 'active' AND datname ISNULL
4233
-
GROUP BY tag_datname, tag_wait_event_type
4233
+
GROUP BY tag_datname, tag_wait_event_type, tag_wait_event
4234
4234
14:|-
4235
-
SELECT datname as tag_datname, query_id::text as tag_query_id, coalesce (wait_event, 'CPU*')|| ' - ' || coalesce(wait_event_type, 'CPU*') as tag_wait_event_type, count(*) as total
4235
+
SELECT datname as tag_datname, query_id::text as tag_query_id, coalesce (wait_event, 'CPU*')as tag_wait_event, coalesce(wait_event_type, 'CPU*') as tag_wait_event_type, count(*) as total
4236
4236
FROM pg_stat_activity
4237
4237
WHERE state = 'active'
4238
-
GROUP BY tag_datname, tag_query_id, tag_wait_event_type
4238
+
GROUP BY tag_datname, tag_query_id, tag_wait_event_type, tag_wait_event
4239
4239
UNION
4240
-
SELECT 'server_process' as tag_datname, NULL as tag_query_id, coalesce (wait_event, 'CPU*')|| ' - ' || coalesce(wait_event_type, 'CPU*') as tag_wait_event_type, count(*) as total
4240
+
SELECT 'server_process' as tag_datname, NULL as tag_query_id, coalesce (wait_event, 'CPU*')as tag_wait_event, coalesce(wait_event_type, 'CPU*') as tag_wait_event_type, count(*) as total
4241
4241
FROM pg_stat_activity
4242
4242
WHERE state = 'active' AND datname ISNULL
4243
-
GROUP BY tag_datname, tag_query_id, tag_wait_event_type
4243
+
GROUP BY tag_datname, tag_query_id, tag_wait_event_type, tag_wait_event