-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy path750-pg_defpart.yml
44 lines (41 loc) · 1.21 KB
/
750-pg_defpart.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
##
# SYNOPSIS
# pg_defpart_*
#
# DESCRIPTION
# PostgreSQL default partition tuples
#
# OPTIONS
# Tags []
# TTL 60
# Priority 0
# Timeout 1s
# Fatal false
# Version 110000 ~ higher
# Source 750-pg_defpart.yml
#
# METRICS
# datname (LABEL)
# Database name of this default partition
# relname (LABEL)
# Schema qualified default partition relation name
# tuples (GAUGE)
# Number of tuples in this default partition
#
pg_defpart:
name: pg_defpart
desc: PostgreSQL default partition tuples
query: SELECT CURRENT_CATALOG AS datname, relnamespace::RegNamespace || '.' || relname AS relname, reltuples AS tuples FROM pg_class WHERE relpartbound IS NOT NULL AND pg_catalog.pg_get_expr(relpartbound, oid) = 'DEFAULT' ORDER BY reltuples DESC LIMIT 64;
ttl: 60
timeout: 1
min_version: 110000
metrics:
- datname:
usage: LABEL
description: Database name of this default partition
- relname:
usage: LABEL
description: Schema qualified default partition relation name
- tuples:
usage: GAUGE
description: Number of tuples in this default partition