01 / DECLARE
Define metrics in YAML + SQL
◇ Add metrics without rebuilding
- Map columns to GAUGE, COUNTER, HISTOGRAM, and LABEL.
- Set a cache TTL and query timeout for each collector.
- Load bundled and custom collectors from one directory.
pg_example:
query: SELECT count(*) AS count FROM pg_stat_activity
metrics:
- count:
usage: GAUGE
description: Number of connections