Deploy an hourly systemd timer that writes pool and dataset capacity to node_exporter's textfile collector, since --collector.zfs exposes only ARC/I-O/state. Add a provisioned 'ZFS - Pools & Datasets' dashboard with per-pool totals, per-dataset used/quota and daily growth panels.
19 lines
806 B
YAML
19 lines
806 B
YAML
---
|
|
# ZFS capacity metrics (Prometheus)
|
|
# ---------------------------------
|
|
# Exposes pool size/used/free and per-dataset used/quota to Prometheus via
|
|
# node_exporter's textfile collector. node_exporter's built-in --collector.zfs
|
|
# only exposes ARC, I/O and pool state — not capacity.
|
|
zfs_metrics_enabled: true
|
|
|
|
# Directory node_exporter's textfile collector reads `*.prom` files from.
|
|
# Must match node_exporter_textfile_dir in roles/node_exporter/defaults/main.yml.
|
|
zfs_metrics_dir: /var/lib/node_exporter/textfile_collector
|
|
|
|
# Where the collector script is installed.
|
|
zfs_metrics_script_path: /usr/local/bin/zfs-metrics.sh
|
|
|
|
# systemd OnCalendar expression for the collection timer. Hourly is plenty to
|
|
# track daily growth; Prometheus keeps 90d of history on andromeda.
|
|
zfs_metrics_interval: "hourly"
|