-
Notifications
You must be signed in to change notification settings - Fork 45
/
220-pg_sync_standby.yml
42 lines (38 loc) · 1.15 KB
/
220-pg_sync_standby.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
##
# SYNOPSIS
# pg_sync_standby_*
#
# DESCRIPTION
# PostgreSQL synchronous standby status and names
#
# OPTIONS
# Tags [cluster]
# TTL 10
# Priority 0
# Timeout 100ms
# Fatal false
# Version 90400 ~ higher
# Source 220-pg_sync_standby.yml
#
# METRICS
# names (LABEL)
# List of standby servers that can support synchronous replication, <null> if not enabled
# enabled (GAUGE)
# Synchronous commit enabled, 1 if enabled, 0 if disabled
#
pg_sync_standby:
name: pg_sync_standby
desc: PostgreSQL synchronous standby status and names
query: |
SELECT CASE WHEN names <> '' THEN names ELSE '<null>' END AS names, CASE WHEN names <> '' THEN 1 ELSE 0 END AS enabled FROM (SELECT current_setting('synchronous_standby_names') AS names) n;
ttl: 10
min_version: 090400
tags:
- cluster
metrics:
- names:
usage: LABEL
description: List of standby servers that can support synchronous replication, <null> if not enabled
- enabled:
usage: GAUGE
description: Synchronous commit enabled, 1 if enabled, 0 if disabled