01 / DECLARE
Define metrics in YAML + SQL
◇ Change the collector, not the binary
- Map columns to GAUGE, COUNTER, HISTOGRAM, and LABEL.
- Set TTL, timeout, skip, and fatal behavior per collector.
- Keep custom collectors beside the shipped ones.
The metric contract stays readable to the database team.
pg_example:
query: SELECT value FROM view
min_version: 100000
tags: [cluster, primary]
ttl: 10
timeout: 0.1