feat: add pg_wal directory size monitoring

Closes #167 (closed)

Summary

  • add a new instance-level pg_wal_size metric backed by pg_ls_waldir()
  • enable the metric in the full preset
  • add a pg_wal directory size panel to the single-node performance overview dashboard
  • emit a status code when the function is unavailable or lacks execute privilege
  • correct the existing archive_lag gauge list to use the emitted archived_wal_finish_lsn_numeric series instead of the stale non-emitted archived_wal_start_lsn_numeric name

Verification

  • bun test cli/test/config-consistency.test.ts
  • bun -e "import yaml from 'js-yaml'; import { readFileSync } from 'fs'; yaml.load(readFileSync('config/pgwatch-prometheus/metrics.yml', 'utf8')); console.log('yaml ok');"
  • node -e "const fs=require('fs'); JSON.parse(fs.readFileSync('config/grafana/dashboards/Dashboard_1_Node_performance_overview.json','utf8')); console.log('dashboard json ok');"
  • grep -RIn "archived_wal_start_lsn_numeric" . --exclude-dir=.git (no in-repo references remain)
Edited by Maya P

Merge request reports

Loading