-
Notifications
You must be signed in to change notification settings - Fork 56
Expand file tree
/
Copy path0440-pg_xact.yml
More file actions
16 lines (14 loc) · 886 Bytes
/
0440-pg_xact.yml
File metadata and controls
16 lines (14 loc) · 886 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#==============================================================#
# 0440 pg_xact
#==============================================================#
pg_xact:
name: pg_xact
desc: PostgreSQL transaction identifier metrics
query: WITH snap(v) AS (SELECT txid_current_snapshot()), xset(v) AS (SELECT txid_snapshot_xip(v) FROM snap), xnum(v) AS (SELECT count(*) from xset), xmin(v) AS (SELECT txid_snapshot_xmin(v) FROM snap), xmax(v) AS (SELECT txid_snapshot_xmax(v) FROM snap) SELECT xmin.v AS xmin, xmax.v AS xmax, xnum.v AS xnum FROM xmin, xmax, xnum;
ttl: 10
min_version: 090400
tags: [ cluster ]
metrics:
- xmin: { usage: COUNTER ,description: "Earliest txid that is still active" }
- xmax: { usage: COUNTER ,description: "First as-yet-unassigned txid. txid >= this are invisible." }
- xnum: { usage: GAUGE ,description: "Current active transaction count" }