-
Notifications
You must be signed in to change notification settings - Fork 59
Expand file tree
/
Copy path0120-pg_meta.yml
More file actions
80 lines (78 loc) · 4.74 KB
/
Copy path0120-pg_meta.yml
File metadata and controls
80 lines (78 loc) · 4.74 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#==============================================================#
# 0120 pg_meta
#==============================================================#
pg_meta_13:
name: pg_meta
desc: PostgreSQL meta info for pg 13+, with extra primary conninfo
query: |
SELECT
(SELECT system_identifier FROM pg_control_system()) AS cluster_id,
current_setting('cluster_name') AS cluster_name,
current_setting('port') AS listen_port,
current_setting('data_directory', true) AS data_dir,
current_setting('config_file', true) AS conf_path,
current_setting('hba_file', true) AS hba_path,
current_setting('wal_level') AS wal_level,
current_setting('server_encoding') AS encoding,
current_setting('server_version') AS version,
current_setting('server_version_num') AS ver_num,
version() AS ver_str,
current_setting('shared_preload_libraries', true) AS extensions,
current_setting('primary_conninfo', true) AS primary_conninfo,
1 AS info
ttl: 10
min_version: 130000
tags: [ cluster ]
metrics:
- cluster_id: { usage: LABEL ,description: "cluster system identifier" }
- cluster_name: { usage: LABEL ,description: "cluster name" }
- listen_port: { usage: LABEL ,description: "listen port" }
- data_dir: { usage: LABEL ,description: "path to data directory" }
- conf_path: { usage: LABEL ,description: "path to postgresql.conf" }
- hba_path: { usage: LABEL ,description: "path to pg_hba.conf" }
- wal_level: { usage: LABEL ,description: "wal level" }
- encoding: { usage: LABEL ,description: "server encoding" }
- version: { usage: LABEL ,description: "server version in human-readable format" }
- ver_num: { usage: LABEL ,description: "server version number in machine-readable format" }
- ver_str: { usage: LABEL ,description: "complete version string" }
- extensions: { usage: LABEL ,description: "server installed preload libraries" }
- primary_conninfo: { usage: LABEL ,description: "connection string to upstream (do not set password here)" }
- info: { usage: GAUGE ,description: "constant 1" }
pg_meta_10:
name: pg_meta
desc: PostgreSQL meta info
query: |
SELECT
(SELECT system_identifier FROM pg_control_system()) AS cluster_id,
current_setting('cluster_name') AS cluster_name,
current_setting('port') AS listen_port,
current_setting('data_directory', true) AS data_dir,
current_setting('config_file', true) AS conf_path,
current_setting('hba_file', true) AS hba_path,
current_setting('wal_level') AS wal_level,
current_setting('server_encoding') AS encoding,
current_setting('server_version') AS version,
current_setting('server_version_num') AS ver_num,
version() AS ver_str,
current_setting('shared_preload_libraries', true) AS extensions,
'N/A' AS primary_conninfo,
1 AS info
ttl: 10
min_version: 090600
max_version: 130000
tags: [ cluster ]
metrics:
- cluster_id: { usage: LABEL ,description: "cluster system identifier" }
- cluster_name: { usage: LABEL ,description: "cluster name" }
- listen_port: { usage: LABEL ,description: "listen port" }
- data_dir: { usage: LABEL ,description: "path to data directory" }
- conf_path: { usage: LABEL ,description: "path to postgresql.conf" }
- hba_path: { usage: LABEL ,description: "path to pg_hba.conf" }
- wal_level: { usage: LABEL ,description: "wal level" }
- encoding: { usage: LABEL ,description: "server encoding" }
- version: { usage: LABEL ,description: "server version in human-readable format" }
- ver_num: { usage: LABEL ,description: "server version number in machine-readable format" }
- ver_str: { usage: LABEL ,description: "complete version string" }
- extensions: { usage: LABEL ,description: "server installed preload libraries" }
- primary_conninfo: { usage: LABEL ,description: "connection string to upstream (do not set password here)" }
- info: { usage: GAUGE ,description: "constant 1" }