Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf763b06

Browse files
Separated wait event from wait event type in wait_events query
1 parent1952334 commitf763b06

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

‎config/pgwatch-prometheus/metrics.yml‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4222,25 +4222,25 @@ metrics:
42224222
providing insights into potential bottlenecks and resource contention issues.
42234223
sqls:
42244224
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
42264226
FROM pg_stat_activity
42274227
WHERE state = 'active'
4228-
GROUP BY tag_datname, tag_wait_event_type
4228+
GROUP BY tag_datname, tag_wait_event_type, tag_wait_event
42294229
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
42314231
FROM pg_stat_activity
42324232
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
42344234
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
42364236
FROM pg_stat_activity
42374237
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
42394239
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
42414241
FROM pg_stat_activity
42424242
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
42444244
gauges:
42454245
-total
42464246
is_instance_level:true

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp