-
Notifications
You must be signed in to change notification settings - Fork 45
/
650-pg_subrel.yml
48 lines (45 loc) · 1.4 KB
/
650-pg_subrel.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
##
# SYNOPSIS
# pg_subrel_*
#
# DESCRIPTION
# PostgreSQL subscribed relation group by state
#
# OPTIONS
# Tags []
# TTL 10
# Priority 0
# Timeout 100ms
# Fatal false
# Version 100000 ~ higher
# Source 650-pg_subrel.yml
#
# METRICS
# datname (LABEL)
# Name of the database which publication belonged
# subname (LABEL)
# Name of the subscription
# state (LABEL)
# State of table in subscription, i=initialize, d=data copy, s=sync, r=ready
# count (GAUGE)
# Count of relation in this subscription and corresponding state
#
pg_subrel:
name: pg_subrel
desc: PostgreSQL subscripted relation group by state
query: SELECT CURRENT_CATALOG AS datname, subname, srsubstate::TEXT AS state, count(*) AS count FROM pg_subscription_rel sr LEFT JOIN pg_stat_subscription ss ON sr.srsubid = ss.subid GROUP BY 2, 3;
ttl: 10
min_version: 100000
metrics:
- datname:
usage: LABEL
description: Name of the database which publication belonged
- subname:
usage: LABEL
description: Name of the subscription
- state:
usage: LABEL
description: State of table in subscription, i=initialize, d=data copy, s=sync, r=ready
- count:
usage: GAUGE
description: Count of relation in this subscription and corresponding state