-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy path420-pg_wait.yml
47 lines (43 loc) · 1.32 KB
/
420-pg_wait.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
##
# SYNOPSIS
# pg_wait_*
#
# DESCRIPTION
# PostgreSQL backend client count group by wait event type since 9.6
#
# OPTIONS
# Tags [cluster]
# TTL 10
# Priority 0
# Timeout 100ms
# Fatal false
# Version 90600 ~ higher
# Source 420-pg_wait.yml
#
# METRICS
# datname (LABEL)
# Name of the database this backend is connected to
# event (LABEL)
# Wait event type, LWLock, Lock, BufferPin, Activity, Extension, Client, IPC, Timeout, IO
# count (GAUGE)
# Count of WaitEvent on target database
#
pg_wait:
name: pg_wait
desc: PostgreSQL backend client count group by wait event type since 9.6
query: |
SELECT datname, wait_event_type AS event, count(*) AS count FROM pg_stat_activity WHERE datname NOT IN ('template0', 'template1') AND backend_type = 'client backend' AND pid <> pg_backend_pid() GROUP BY 1, 2;
ttl: 10
min_version: 090600
tags:
- cluster
metrics:
- datname:
usage: LABEL
description: Name of the database this backend is connected to
- event:
usage: LABEL
description: Wait event type, LWLock, Lock, BufferPin, Activity, Extension, Client, IPC, Timeout, IO
- count:
usage: GAUGE
description: Count of WaitEvent on target database