-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy path380-pg_shmem.yml
54 lines (51 loc) · 1.58 KB
/
380-pg_shmem.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
54
##
# SYNOPSIS
# pg_shmem_*
#
# DESCRIPTION
# Allocations made from the server's main shared memory segment
#
# OPTIONS
# Tags [cluster, schema:monitor]
# TTL 60
# Priority 0
# Timeout 100ms
# Fatal false
# Version 130000 ~ higher
# Source 380-pg_shmem.yml
#
# METRICS
# name (LABEL)
# Name of the shared memory allocation
# offset (GAUGE)
# The offset at which the allocation starts
# size (GAUGE)
# Size of the allocation
# allocated_size (GAUGE)
# Size of the allocation including padding
#
# pg_shmem require su privilege to work. Disable it or create auxiliary function with su before use:
# CREATE OR REPLACE FUNCTION monitor.pg_shmem() RETURNS SETOF pg_shmem_allocations AS $$ SELECT * FROM pg_shmem_allocations;$$ LANGUAGE SQL SECURITY DEFINER;
pg_shmem:
name: pg_shmem
desc: Allocations made from the server's main shared memory segment
query: SELECT coalesce(name, 'Free') AS name, off AS offset, size, allocated_size FROM monitor.pg_shmem();
ttl: 60
min_version: 130000
skip: true # disable it by default
tags:
- cluster
- schema:monitor
metrics:
- name:
usage: LABEL
description: Name of the shared memory allocation
- offset:
usage: GAUGE
description: The offset at which the allocation starts
- size:
usage: GAUGE
description: Size of the allocation
- allocated_size:
usage: GAUGE
description: Size of the allocation including padding