-
Notifications
You must be signed in to change notification settings - Fork 45
/
270-pg_origin.yml
51 lines (46 loc) · 1.6 KB
/
270-pg_origin.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
##
# SYNOPSIS
# pg_origin_*
#
# DESCRIPTION
# PostgreSQL replay state (approximate) for a certain origin
#
# OPTIONS
# Tags [cluster]
# TTL 10
# Priority 0
# Timeout 100ms
# Fatal false
# Version 90500 ~ higher
# Source 270-pg_origin.yml
#
# METRICS
# roiname (LABEL)
# The external, user defined, name of a replication origin.
# remote_lsn (LABEL)
# The origin node's LSN up to which data has been replicated.
# local_lsn (LABEL)
# This node's LSN at which remote_lsn has been replicated.
#
# skip by default, require additional privilege setup
# GRANT SELECT ON pg_replication_origin, pg_replication_origin_status TO pg_monitor;
pg_origin:
name: pg_origin
desc: PostgreSQL replay state (approximate) for a certain origin
query: SELECT roname, remote_lsn - '0/0' AS remote_lsn, local_lsn - '0/0' AS local_lsn FROM pg_replication_origin o LEFT JOIN pg_replication_origin_status os ON o.roident = os.local_id;
ttl: 10
min_version: 090500
skip: true
tags:
- cluster
metrics:
- roiname:
usage: LABEL
description: The external, user defined, name of a replication origin.
- remote_lsn:
usage: LABEL
description: The origin node's LSN up to which data has been replicated.
- local_lsn:
usage: LABEL
description: This node's LSN at which remote_lsn has been replicated.
# This node's LSN at which remote_lsn has been replicated. Used to flush commit records before persisting data to disk when using asynchronous commits.