feat: add pg_wal directory size monitoring
Closes #167 (closed)
Summary
- add a new instance-level
pg_wal_sizemetric backed bypg_ls_waldir() - enable the metric in the
fullpreset - add a
pg_wal directory sizepanel to the single-node performance overview dashboard - emit a status code when the function is unavailable or lacks execute privilege
- correct the existing
archive_laggauge list to use the emittedarchived_wal_finish_lsn_numericseries instead of the stale non-emittedarchived_wal_start_lsn_numericname
Verification
bun test cli/test/config-consistency.test.tsbun -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