Series · GNTECH Infrastructure Deployment Series · Part 11 of 12 · Previous: Part 10 — Backup and Disaster Recovery · Next: Part 12 — Security Validation and Operations (planned)
The off-site restore drill in Part 10 gives you recovery evidence for one point in time. Monitoring helps you notice when that evidence stops arriving. A reachable backup server can still hold an old backup, and an empty dashboard can mean the collector has stopped reporting.
This reference lab uses Prometheus 3, Node Exporter’s textfile collector, Bash, and Docker Compose v2 on a Linux guest. It creates synthetic data in a dedicated project. The timestamp stands for the most recent backup that passed your acceptance criteria. A production collector must derive it from actual task and snapshot evidence. Running the lab does not validate a Proxmox backup.
1. Decide what each signal means
| Signal | Question it answers |
|---|---|
| Last accepted backup timestamp | How old is the latest recovery point that passed the chosen checks? |
| Missing timestamp metric | Has this job stopped supplying evidence? |
| Exporter scrape status | Can Prometheus collect anything from this exporter? |
| Textfile collector error | Did a metric file fail to parse? |
Use the existing monitoring stack guide for Grafana, Alertmanager, and logs. This installment concentrates on the freshness boundary. Grafana can display the same age expression, while Loki holds task logs for investigation. Blackbox or Uptime Kuma probes test reachability separately from backup quality.
2. Start a private metrics lab
Choose supported image releases for your environment and record their digests when promoting the lab. The example tags track major release lines. Only Prometheus publishes a guest port, bound to loopback.
|
|
The five-minute threshold is deliberately short for testing. Choose production thresholds from the recovery-point objective plus the expected backup, sync, verification, and polling delays. Keep one missing-data rule per expected job or join against an explicit inventory. A generic absence expression across many jobs will miss an individual job disappearing while others remain.
3. Publish the timestamp atomically
Create a small lab writer. It accepts a Unix timestamp and atomically renames a temporary file in the same directory. Node Exporter reads files ending in .prom, so it will not read the temporary file halfway through a write.
|
|
Open http://127.0.0.1:9090 on the guest, or use a trusted SSH tunnel if working remotely. Inspect Targets, then query the metric and up{job="backup-evidence-lab"}. Expect the scrape to be up and the timestamp age to be small after the first collection.
4. Exercise all three data states
Keep the Prometheus alerts page open. A rule becomes pending when its expression first matches, then firing after its for interval has elapsed. Allow for scrape and evaluation intervals.
|
|
Run the next test only after observing the previous alert resolve.
|
|
Record which alerts fired and resolved, with timestamps. A missing-evidence alert may also fire during an exporter outage once the metric becomes stale. Use Alertmanager grouping and inhibition deliberately when moving beyond the lab. These rules demonstrate state transitions in Prometheus. Notification delivery requires a configured Alertmanager and receiver, and a separate test that a person actually receives the alert.
5. Connect real evidence and keep a runbook
For production, poll the relevant backup system on a schedule with a read-only identity. Confirm the expected guest, namespace, snapshot timestamp, task result, and verification policy. Publish the snapshot’s timestamp as the metric value. Advancing it to the current polling time would hide an old backup. Keep the last accepted value on a failed check and expose a separate collector-health signal so a broken poller is distinguishable from an old recovery point.
Do not add snapshot IDs or task IDs as ever-changing metric labels. Keep detailed identifiers in the logs and link the alert’s runbook to those logs. Check clock synchronization because the age expression compares two clocks.
| Failure | First investigation |
|---|---|
| Old evidence | Check latest accepted snapshot, failed backup/sync/verification jobs, and schedule delays. |
| Missing evidence with scrape up | Check the expected job label, file presence, and textfile parse errors. |
| Scrape down | Check exporter process, DNS, network path, and Prometheus target error. |
| Alert firing but nobody notified | Check Alertmanager connectivity, routing, silences, and receiver delivery. |
Stop the isolated lab with docker compose down. Its Prometheus history is disposable. Keep the files if you want to repeat the drill. When adding these rules to an existing system, preserve its known-good configuration, validate before reload, and restore that configuration if validation or expected collection fails.
Part 12 will bring the recovery, access, and monitoring checks into an operational handoff with named owners and evidence.