scripts/collect-prometheus.shgathers Varnish, OpenLiteSpeed, Redis, Cloudflare, and WordPress metrics, writes a structured JSON snapshot intomonitoring/reports/health-<timestamp>.json, then renders Prometheus metrics through Nickel (monitoring/exporter.ncl) intomonitoring/prometheus/health.prom.scripts/dust-hypatia.jlparsescontractiles/dust/Dustfileand emitsmonitoring/reports/dust-hypatia.json, turning each recovery/compliance block into a reusable JSON event for Hypatia or dashboards. When invoked with--incident-*metadata, it also writes incident-specific dustfiles intomonitoring/reports/incidents/incident-<timestamp>.jsonso alerts carry the precise remediation steps.monitoring/exporter.ncldrives the schema so every metric you see in dashboards or Hypatia matches the same data model (seemonitoring/metrics.schema.json).monitoring/prometheus/alerts.ymldefines the alert rules; Alertmanager should load this file so outages triggermonitoring/alert-trigger.sh, which emits an incident dustfile and can optionally dispatch the GitHub Hypatia workflow with context on the failing metric.monitoring/prometheus/grafana-dashboard.jsonis an importable Grafana dashboard showing the five “courses” (cache, TLS, Cloudflare, Redis, WordPress errors) plus a Hypatia-status panel.
- Install prerequisites:
curl,jq,nickel, plusvarnishstat,redis-cli, andwpif available. - Export credentials:
CF_API_TOKEN+CF_ZONE_ID(orCLOUDFLARE_API_TOKEN+CLOUDFLARE_ZONE_ID),OLS_STATUS_USER,OLS_STATUS_PASS, and, if you want GitHub workflow dispatch,GITHUB_TOKEN,GITHUB_REPOSITORY, and optionallyGITHUB_REF_NAME. - Execute:
CF_ZONE_ID=... CF_API_TOKEN=... OLS_STATUS_USER=... OLS_STATUS_PASS=... GITHUB_TOKEN=... GITHUB_REPOSITORY=hyperpolymath/lcb-website ./scripts/collect-prometheus.sh
- The script drops
monitoring/prometheus/health.prom(for Prometheus/node_exporter) andmonitoring/reports/health-*.json(for Hypatia/archival).
monitoring/setup-exporter.shsymlinks the latesthealth.prominto/var/lib/node_exporter/textfile_collector/health.prom; run it on whichever host runs node_exporter to keep the exporter in sync.monitoring/alert-trigger.shchecks the latest JSON snapshot for failing thresholds, emits an incident dustfile, and, whenGITHUB_TOKENplusGITHUB_REPOSITORYare present, calls the GitHub workflow dispatch API for.github/workflows/hypatia-scan.yml.
monitoring/alert-trigger.shalso evaluates the latest health JSON and, when necessary, callsjulia scripts/dust-hypatia.jl --incident-*so an incident dustfile is emitted undermonitoring/reports/incidents/. Attach that file to any Hypatia/Grafana alerts so LLMs get the curated remediation steps.
- Add
monitoring/prometheus/health.promto node_exporter via a symlink or direct copy. - Import
monitoring/prometheus/grafana-dashboard.jsoninto Grafana to render the core 6-panel view. - Add
monitoring/prometheus/alerts.ymlto your Prometheusrule_files; Alertmanager should send alerts (and optionally trigger Hypatia viamonitoring/alert-trigger.sh).
- Schedule
scripts/collect-prometheus.shthrough cron/Ansible/toolbox (make sure the environment exports the required tokens). - After updating
contractiles/dust/Dustfile, rerunscripts/dust-hypatia.jl(or hook it intojust dust-hypatia) somonitoring/reports/dust-hypatia.jsonremains current and discoverable by Hypatia. monitoring/alert-trigger.shshould run aftercollect-prometheus(already included) so incident dustfiles are generated automatically and available to Alertmanager, Hypatia, or manual responders.- When GitHub workflow dispatch is configured, Hypatia will re-run and include the latest
health-*.jsonsnapshot; otherwise the dustfile remains the canonical local artifact for remediation. - Run
just sanctify-analyze(orbash scripts/run-sanctify.sh) before packaging somonitoring/reports/sanctify-theme.jsonandsanctify-theme-summary.txtare available for Hypatia/CT manifests. The script builds the localsanctify-php(requires Cabal/GHC access to Hackage) and targets thewp-content/themes/sinopletree.