-
Notifications
You must be signed in to change notification settings - Fork 56
Expand file tree
/
Copy path1800-pg_tsdb_hypertable.yml
More file actions
30 lines (27 loc) · 1.3 KB
/
1800-pg_tsdb_hypertable.yml
File metadata and controls
30 lines (27 loc) · 1.3 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
#==============================================================#
# 1800 pg_tsdb_hypertable
#==============================================================#
# this collector reqires timescaledb extension to be installed
pg_tsdb_hypertable:
name: pg_tsdb_hypertable
desc: TimescaleDB hypertable overview
query: |-
SELECT
current_database() AS datname,
format('%I.%I', hypertable_schema, hypertable_name) AS relname,
num_dimensions AS dimensions, num_chunks AS chunks,
compression_enabled::BOOLEAN::int AS compressed,
hypertable_size(format('"%I"."%I"', hypertable_schema, hypertable_name)::RegClass) AS bytes
FROM timescaledb_information.hypertables;
ttl: 60
timeout: 2
min_version: 100000
skip: true
tags: [ "extension:timescaledb", "schema:timescaledb_information" ]
metrics:
- datname: { usage: LABEL ,description: "database name" }
- relname: { usage: LABEL ,description: "Hypertable relation name" }
- dimensions: { usage: GAUGE ,description: "Number of partitioning dimensions" }
- chunks: { usage: GAUGE ,description: "Total chunks of this hypertable" }
- compressed: { usage: GAUGE ,description: "1 if compression enabled" }
- bytes: { usage: GAUGE ,description: "Total size of hypertable in bytes" }