-
Notifications
You must be signed in to change notification settings - Fork 56
Expand file tree
/
Copy path0350-pg_checkpoint.yml
More file actions
54 lines (51 loc) · 2.93 KB
/
0350-pg_checkpoint.yml
File metadata and controls
54 lines (51 loc) · 2.93 KB
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
46
47
48
49
50
51
52
#==============================================================#
# 0350 pg_checkpoint
#==============================================================#
pg_checkpoint:
name: pg_checkpoint
desc: checkpoint information from pg_control_checkpoint since 10
query: |-
SELECT
checkpoint_lsn - '0/0' AS checkpoint_lsn,
redo_lsn - '0/0' AS redo_lsn,
timeline_id AS tli,
prev_timeline_id AS prev_tli,
full_page_writes,
split_part(next_xid, ':', 1) AS next_xid_epoch,
split_part(next_xid, ':', 2) AS next_xid,
next_oid::BIGINT,
next_multixact_id::text::BIGINT,
next_multi_offset::text::BIGINT,
oldest_xid::text::BIGINT,
oldest_xid_dbid::text::BIGINT,
oldest_active_xid::text::BIGINT,
oldest_multi_xid::text::BIGINT,
oldest_multi_dbid::BIGINT,
oldest_commit_ts_xid::text::BIGINT,
newest_commit_ts_xid::text::BIGINT,
checkpoint_time AS time,
extract(epoch from now() - checkpoint_time) AS elapse
FROM pg_control_checkpoint();
ttl: 60
min_version: 100000
tags: [ cluster ]
metrics:
- checkpoint_lsn: { usage: COUNTER ,description: "Latest checkpoint location" }
- redo_lsn: { usage: COUNTER ,description: "Latest checkpoint's REDO location" }
- tli: { usage: COUNTER ,description: "Latest checkpoint's TimeLineID" }
- prev_tli: { usage: COUNTER ,description: "Latest checkpoint's PrevTimeLineID" }
- full_page_writes: { usage: GAUGE ,description: "Latest checkpoint's full_page_writes enabled" }
- next_xid_epoch: { usage: COUNTER ,description: "Latest checkpoint's NextXID epoch" }
- next_xid: { usage: COUNTER ,description: "Latest checkpoint's NextXID xid" }
- next_oid: { usage: COUNTER ,description: "Latest checkpoint's NextOID" }
- next_multixact_id: { usage: COUNTER ,description: "Latest checkpoint's NextMultiXactId" }
- next_multi_offset: { usage: COUNTER ,description: "Latest checkpoint's NextMultiOffset" }
- oldest_xid: { usage: COUNTER ,description: "Latest checkpoint's oldestXID" }
- oldest_xid_dbid: { usage: GAUGE ,description: "Latest checkpoint's oldestXID's DB OID" }
- oldest_active_xid: { usage: COUNTER ,description: "Latest checkpoint's oldestActiveXID" }
- oldest_multi_xid: { usage: COUNTER ,description: "Latest checkpoint's oldestMultiXid" }
- oldest_multi_dbid: { usage: GAUGE ,description: "Latest checkpoint's oldestMulti's DB OID" }
- oldest_commit_ts_xid: { usage: COUNTER ,description: "Latest checkpoint's oldestCommitTsXid" }
- newest_commit_ts_xid: { usage: COUNTER ,description: "Latest checkpoint's newestCommitTsXid" }
- time: { usage: COUNTER ,description: "Time of latest checkpoint" }
- elapse: { usage: GAUGE ,description: "Seconds elapsed since latest checkpoint in seconds" }