-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy path730-pg_seq.yml
53 lines (51 loc) · 1.83 KB
/
730-pg_seq.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
##
# SYNOPSIS
# pg_seq_*
#
# DESCRIPTION
# PostgreSQL sequence metrics
#
# OPTIONS
# Tags []
# TTL 10
# Priority 0
# Timeout 100ms
# Fatal false
# Version 100000 ~ higher
# Source 730-pg_seq.yml
#
# METRICS
# datname (LABEL)
# Database name of this sequence
# seqname (LABEL)
# Fully schema qualified sequence name
# last_value (COUNTER)
# The last sequence value written to disk
# blks_read (COUNTER)
# Number of disk blocks read from this sequence
# blks_hit (COUNTER)
# Number of buffer hits in this sequence
#
pg_seq:
desc: PostgreSQL sequence metrics
query: SELECT CURRENT_CATALOG AS datname, schemaname || '.' || sequencename AS seqname, last_value, blks_read, blks_hit FROM pg_sequences s, LATERAL (SELECT relid, blks_read, blks_hit FROM pg_statio_all_sequences sio WHERE s.schemaname = sio.schemaname AND s.sequencename = sio.relname LIMIT 1) d LIMIT 128;
ttl: 10
min_version: 100000
metrics:
- datname:
usage: LABEL
description: Database name of this sequence
- seqname:
usage: LABEL
description: Fully schema qualified sequence name
- last_value:
usage: COUNTER
description: The last sequence value written to disk
# The last sequence value written to disk. If caching is used, this value can be greater than the last value handed out from the sequence.
# Null if the sequence has not been read from yet. Also, if the current user does not have USAGE or SELECT privilege on the sequence, the value is null.
- blks_read:
usage: COUNTER
description: Number of disk blocks read from this sequence
- blks_hit:
usage: COUNTER
description: Number of buffer hits in this sequence