-
Notifications
You must be signed in to change notification settings - Fork 45
/
640-pg_pubrel.yml
43 lines (40 loc) · 1.06 KB
/
640-pg_pubrel.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
##
# SYNOPSIS
# pg_pubrel_*
#
# DESCRIPTION
# PostgreSQL publication and relation count
#
# OPTIONS
# Tags []
# TTL 10
# Priority 0
# Timeout 100ms
# Fatal false
# Version 100000 ~ higher
# Source 640-pg_pubrel.yml
#
# METRICS
# datname (LABEL)
# Name of the database which publication belonged
# pubname (LABEL)
# Name of the publication
# count (GAUGE)
# Count of relation in the publication
#
pg_pubrel:
name: pg_pubrel
desc: PostgreSQL publication and relation count
query: SELECT CURRENT_CATALOG AS datname, pubname, count(*) AS count FROM pg_publication p, LATERAL pg_get_publication_tables(pubname) GROUP BY pubname;
ttl: 10
min_version: 100000
metrics:
- datname:
usage: LABEL
description: Name of the database which publication belonged
- pubname:
usage: LABEL
description: Name of the publication
- count:
usage: GAUGE
description: Count of relation in the publication