-
Notifications
You must be signed in to change notification settings - Fork 45
/
350-pg_checkpoint.yml
125 lines (122 loc) · 4.45 KB
/
350-pg_checkpoint.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
##
# SYNOPSIS
# pg_checkpoint_*
#
# DESCRIPTION
# checkpoint information from pg_control_checkpoint since 10
#
# OPTIONS
# Tags [cluster]
# TTL 60
# Priority 0
# Timeout 100ms
# Fatal false
# Version 100000 ~ higher
# Source 350-pg_checkpoint.yml
#
# METRICS
# checkpoint_lsn (COUNTER)
# Latest checkpoint location
# redo_lsn (COUNTER)
# Latest checkpoint's REDO location
# tli (COUNTER)
# Latest checkpoint's TimeLineID
# prev_tli (COUNTER)
# Latest checkpoint's PrevTimeLineID
# full_page_writes (GAUGE)
# Latest checkpoint's full_page_writes enabled
# next_xid_epoch (COUNTER)
# Latest checkpoint's NextXID epoch
# next_xid (COUNTER)
# Latest checkpoint's NextXID xid
# next_oid (COUNTER)
# Latest checkpoint's NextOID
# next_multixact_id (COUNTER)
# Latest checkpoint's NextMultiXactId
# next_multi_offset (COUNTER)
# Latest checkpoint's NextMultiOffset
# oldest_xid (COUNTER)
# Latest checkpoint's oldestXID
# oldest_xid_dbid (GAUGE)
# Latest checkpoint's oldestXID's DB OID
# oldest_active_xid (COUNTER)
# Latest checkpoint's oldestActiveXID
# oldest_multi_xid (COUNTER)
# Latest checkpoint's oldestMultiXid
# oldest_multi_dbid (GAUGE)
# Latest checkpoint's oldestMulti's DB OID
# oldest_commit_ts_xid (COUNTER)
# Latest checkpoint's oldestCommitTsXid
# newest_commit_ts_xid (COUNTER)
# Latest checkpoint's newestCommitTsXid
# time (COUNTER)
# Time of latest checkpoint
# elapse (GAUGE)
# Seconds elapsed since latest checkpoint in seconds
#
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