-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy path530-pg_clustering.yml
54 lines (52 loc) · 1.47 KB
/
530-pg_clustering.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
##
# SYNOPSIS
# pg_clustering_*
#
# DESCRIPTION
# PostgreSQL cluster or vacuum full progress (v12+)
#
# OPTIONS
# Tags [cluster]
# TTL 10
# Priority 0
# Timeout 100ms
# Fatal false
# Version 120000 ~ higher
# Source 530-pg_clustering.yml
#
# METRICS
# datname (LABEL)
# Name of databae been clustering
# pid (LABEL)
# Process id of indexing table
# relname (LABEL)
# Relation name of indexed table
# tup_scan (GAUGE)
# How much tuple been scanned
# progress (GAUGE)
# Progress of heap been processed
#
pg_clustering:
name: pg_clustering
desc: PostgreSQL cluster or vacuum full progress (v12+)
query: SELECT datname, pid, relid::RegClass AS relname, param4 AS tup_scan, CASE WHEN param6 > 0 THEN 1.0 * param7 / param6 ELSE 0 END AS progress FROM pg_stat_get_progress_info('cluster') s LEFT JOIN pg_database d ON s.datid = d.oid;;
ttl: 10
min_version: 120000
tags:
- cluster
metrics:
- datname:
usage: LABEL
description: Name of databae been clustering
- pid:
usage: LABEL
description: Process id of indexing table
- relname:
usage: LABEL
description: Relation name of indexed table
- tup_scan:
usage: GAUGE
description: How much tuple been scanned
- progress:
usage: GAUGE
description: Progress of heap been processed