The Forge v1.3: The Lab Now Watches Itself

Uptime checks, metrics, phone alerts, backup heartbeats and an outside dead-man switch, all as code. On day one it found a reboot time bomb, and testing it turned up two tools that were quietly reporting nothing.

The Forge v1.3: The Lab Now Watches Itself, a holographic watchtower above a fjord at night

v1.2 gave the Forge a second host and a DockerDocker A tool for packaging software and everything it needs into containers, so it runs the same way on any machine. host that rebuilds itself. Until now, though, the only monitoring was me noticing something had broken. v1.3 fixes that. The lab now checks itself around the clock, keeps metrics, tells my phone when something is wrong, and is watched from outside too, in case the whole thing goes dark. Like everything else here, all of it is code in the repo, deployed by a pipelineCI/CD pipeline An automated line that tests and deploys every change: commit the code, and the pipeline checks it and rolls it out the same way every time. button.

The watchers

  • Uptime checks (Gatus). 25 checks cover DNSDNS Domain Name System. The internet's phone book, turning names like cyberviking.ca into the IP addresses computers actually connect to., including whether home names still resolve correctly, plus the GitGit Version control: a full history of every change to a set of files, with who, when and why, and the ability to roll back. server, the hypervisors, the SIEMSIEM Security information and event management: one place that collects logs from every system, spots suspicious patterns and raises alerts. and its agent ports, the storage server, this site and the internet itself. Every certificate check fails with 14 days to spare, so a broken Let’s Encrypt renewal shows up two weeks before anything expires.
  • Metrics (PrometheusPrometheus An open-source monitoring system that collects metrics from every host and service on a schedule and keeps them as time series for graphs and alerts.). Every host runs a node exporter, and new hosts in the inventory are scraped automatically. The containerscontainer A lightweight, isolated package of an application and its dependencies. It shares the host's kernel, so it starts in seconds, unlike a full virtual machine. report too, and so does the storage server through a small read-only exporter I wrote.
  • Dashboards (GrafanaGrafana Dashboards for metrics: it turns the numbers Prometheus collects into graphs and panels.). One overview, provisioned from a JSON file in the repo: hosts, CPU, memory, disks, network, containers, disk health and the storage array. If I edit it in the UI, the next deploy puts the repo’s version back.
  • Disk health. NVMe wear, media errors, spare blocks and temperatures on the hypervisors, plus SMART on the one spinning disk. The collectors already shipped with the node exporter package; nobody was using them.
  • Alerts to my phone. A failing check alerts after three misses in a row, so a blip stays quiet, and sends a “resolved” message when it recovers.

The monitoring runs on the second hypervisor’s Docker host, not next to the SIEM it watches. A monitor on the same box as the thing it monitors tends to fail at the same moment.

Who watches the watchers

If that Docker host, its hypervisor, the power or the internet goes down, nothing inside the lab can tell me. So the uptime checker also pings an outside service, healthchecks.io, every five minutes. When the pings stop, it alerts me by email and push. That path doesn’t depend on the lab at all.

The same service watches the weekly backups. The container backup and the VM backup each report in when they finish, with success or failure, and a missed week alerts the next day. The weekly certificate job reports to the uptime checker the same way. Silence counts as a failure: if a job stops running, that’s an alert too.

Then I tested it the honest way, by switching the watcher off for 17 minutes. Healthchecks.io noticed on time and the email arrived. The push notification never reached my phone, even though the logs show it was sent. Its own test push arrived fine, so I’m treating it as a one-off and retesting next week. That’s exactly why there are two channels.

The first finding was a time bomb

Within minutes of switching on storage-server monitoring, one check went red: four containers, including the Git server, its CICI Continuous integration. Automation that builds and tests every change as soon as it's pushed, so problems surface early. runner and the primary DNS server, were not set to start automatically. Everything was running, so nothing looked wrong. After the next reboot, though, Git, CI and DNS would all have stayed down until someone noticed and started them by hand. It was a two-minute fix, and only an alert that looks at configuration, not just at whether things are up, would have caught it.

What testing the monitoring taught me

  • No data is not good news. Several checks count problems, and an empty answer counted as “zero problems”. On the first deploy the storage checks ran before any storage data had arrived, so they went green. Every count now fails when there’s no data behind it.
  • A watcher can go blind without complaining. The first container-metrics tool I deployed couldn’t read Docker 29’s new image store. It reported the host and nothing else: no error, no containers. A check that expects the SIEM’s three containers caught it, and a newer release fixed it.
  • Test the alarm, not just the sensor. The uptime checker accepted heartbeat check-ins and showed them, but its version never flagged a missed one. I only found out by running a 10-second heartbeat in a throwaway container and waiting. The upgrade jumped a year of releases.
  • One threshold doesn’t fit every disk. “Disks under 50 °C” went red on day one because of an NVMe cache drive idling at 53 °C, which is normal for NVMe. Spinning disks keep 50 °C; NVMe gets 70 °C.
  • Ship code before secrets. Everything that needs a key or password (API keys, the dashboard login, ping URLs) deploys switched off and turns itself on when the secret appears. The code merged and deployed while I was out, and the last step was me adding four secrets when I got home.
  • The alert channel is a secret too. A public push topic is only as private as its name, and a ping URL lets anyone fake “all good”. Both live with the other secrets, out of git and out of chat.

Versions that move only when I say so

Testing the monitoring exposed a second problem. The uptime checker I’d pinned was a year old, and the container-metrics tool was simply broken on the current Docker. Pinning versions is right, but pins rot quietly.

So v1.3 also brings Renovate. Once a week it reads every pinned version in the repo (container images, AnsibleAnsible A tool that configures servers from text files called playbooks: install this, set that, harden the rest. Run it twice and nothing changes the second time. collections, the OpenTofuOpenTofu An open-source tool that builds infrastructure from code: you describe the virtual machines and networks in text files, and it creates or changes them to match. provider, the CI images) and opens a merge request for anything newer, with the release notes attached. It never merges anything: I read, the pipeline validates, and I decide. New releases wait 14 days before it suggests them, so someone else finds the early bugs. Related pieces move together, so the SIEM’s manager and its agents always match. Anything that would take Prometheus off its long-term-support line waits until I tick a box.

Working with my AI assistant

Most of this release was built while I was away from the keyboard. I set the boundaries: read-only access to the storage server, a temporary login only for the one approved job, no secrets in chat, and deploys only through the pipeline. The assistant built and tested everything up to the point where a secret or a firewall change was needed, then handed me a short checklist. Whenever a check went green when it shouldn’t have, it went looking for why instead of moving on. That was more useful than any single feature.

What’s next

v1.3 is done: the first real backup and certificate heartbeats arrived on schedule, and every check is green. Next is v1.4, a secrets vaultsecrets vault A locked store for passwords, keys and tokens that hands each system only the secrets it's allowed, and logs every read., which retires today’s pattern of keeping each secret in a file plus a matching pipeline variable. After that, v1.5 puts the services behind HTTPSHTTPS HTTP over TLS: web traffic that's encrypted and tied to a certificate, so you know you're talking to the real site. and a login. The roadmap stays in the open on the Forge.

ᛟ ᛟ ᛟ