← alle Posts

November 9, 2026 English Homelab

Who Watches the Watchmen?

I built a watchman for my monitoring. But what actually happens when the watchman dies?

I host a service or two… To make sure they actually work the way they should, I run Uptime Kuma, with around 180 monitors.

Kuma lets me know when something in the house is stuck: A container hangs, a certificate expires, the heat pump stops reporting. So far, so good.
But: Who actually lets me know when Kuma itself is stuck?

Monitoring can break in two ways:

This post is about that second case… and about a short question that reopened my supposedly finished solution completely.

A green dashboard proves nothing

It started with an inventory. On my homelab board, there’s been a card for a while with the question of which control mechanisms actually depend on the very system they’re supposed to monitor. You know the principle from emergency lighting: It’s only useful if it isn’t on the same fuse as the regular lights.

I found a few such cases along the way. This post solves one of them, the others are still open. I’m saying that right at the start on purpose, so this doesn’t read like a pure success story 😉

The core of the problem: An active check asks “are you there?” and gets an answer as long as the web server is running. Whether the checking engine behind it is still working is something it doesn’t learn.

A dead man’s switch works the other way around. It waits for a regular sign of life and raises the alarm when it doesn’t come. So it reacts to silence rather than to unreachability. And pretty much every serious failure leads to silence sooner or later, but by no means every one prevents an answer.

Why the obvious solution isn’t enough

My first reflex: I have a server at hosting.de, it can fetch the Kuma status page every few minutes. Done.

But that doesn’t work, for two reasons:

First, such a request from the outside goes through port forwarding, Nginx Proxy Manager and Kuma itself – in other words, through exactly the services whose failure it’s supposed to report. Two of them even live in the same container at my place.

And if the request fails, I don’t know whether Kuma is dead, the proxy is stuck or the line is simply down. Three very different problems, lumped together under one red bar.

Second, and this weighs heavier: A status page that’s served cleanly doesn’t prove that anything is still being checked. The page can show nothing but green tiles while the last real check is four hours old.

A bit like the departure board at a Cologne tram stop that froze at some point and keeps cheerfully announcing trams that are long gone.

Turning the direction around

The dead man’s switch reverses the flow of data, from the inside out. A container in the homelab sends a sign of life to my external server every five minutes. The server itself never fetches anything, it only checks whether the signal has stopped arriving.

That takes everything I actually want to monitor out of the path: No port forwarding, no reverse proxy, no internal DNS, no Kuma. The check doesn’t use any of the services whose failure it’s supposed to report. That’s really the whole idea.

A short detour: The wrong assumption

Before things got going, there was one more lesson, an uncomfortable one, but it belongs here too:

On the card, the big open question was the actual alerting path. Back then I had noted: There was supposedly no mail server installed on the server, so I’d first have to figure out how an alert could get out at all. Idea: “probably via msmtp”.

Except, after a quick look, it turned out: not true. Exim4 was installed, enabled and running. It just couldn’t deliver anything, because it wanted to send directly via port 25, and my hoster blocks that outbound by default. So what was missing wasn’t a whole service, but a single entry for a relay.

Evaluating the possible alerting paths came down to three commands in the end: Two port probes on the SMTP ports and a curl against three push services.

465  open              (Gmail SMTP relay)
587  open              (Gmail SMTP relay)
443  ntfy.sh           HTTP 200
443  api.pushover.net  HTTP 200
443  api.telegram.org  HTTP 302

Everything reachable, and the implementation reduced to a matter of taste. 🙂

The build

The whole thing consists of four parts, split between inside and outside.

The sender (inside) is a cron job in an LXC container on the Proxmox host. Every five minutes it queries Kuma and sends the result to the external server via ssh. With ControlMaster, i.e. a reused connection, because my hoster throttles new connections per source IP and a five-minute cycle would otherwise end up in the filter (we already had that once elsewhere in July…).

Most important decision: The sign of life isn’t a plain ping, it carries content. A ping would only show that the sender is running, and that’s not the question at all. This is what a current signal looks like (slightly shortened):

The interesting part here is mainly beat_age: The age of the most recent heartbeat across all active monitors, in seconds. As long as something is being checked somewhere, the value is in single digits. If the engine stops, it grows. So a single number answers whether Kuma isn’t just running, but also still checking.

By the way, the five monitors marked “down” in the example aren’t a failure, they’re mostly update monitors that turn red as soon as a new version is available somewhere. Unfortunately Kuma doesn’t know a “yellow” state, it’s been requested for a while.

Plus two small things that pay off in everyday use:

The receiver (external) accepts the signal and writes it down. Nothing more. It runs without root privileges and only lets a tightly limited set of characters through, because the content later ends up verbatim in an email. You don’t have to blindly trust your own counterpart either…

The judge (external) is a cron job on the external server that evaluates every five minutes. It knows two alarm states:

BLIND is really the case I built the whole thing for. Kuma is running but no longer checking anything, and from the outside you fundamentally can’t see that, because the status page keeps being served.

A running alarm repeats no earlier than after six hours, and once everything is working again, an explicit all-clear follows. Without the all-clear, I’d have to check after every alarm whether it’s still current.

The alerting path is a small Python script that sends via Gmail SMTP. The credentials live in a file that only root can read.

What I deliberately didn’t build: A monitor on the watchman in Kuma itself. That would really be circular: If Kuma goes down, this monitor isn’t checked anymore either, and nobody notices anything. (Please keep this paragraph in mind for a moment. 🙂)

Six tests

A watchman whose alarm has never fired is just a claim at first. So let’s test the whole thing…

TestExpectationResult
Normal stateno mailno mail
Sign of life artificially aged to 35 minALARM SILENCEmail delivered
Immediate repeatsuppressedsuppressed
Sign of life fresh againALL-CLEARmail delivered
Three artificial “Kuma not responding” signalsALARM BLINDmail delivered
Real signal afterwardsALL-CLEARmail delivered

Six tests, all properly measured, signed off. Card closed, docs pushed, done.

Or so I thought…

The question

I designed and built the entire setup in dialogue with Claude. In Claude’s closing summary there was a sentence about the self-test. The watchman regularly sends an “I’m still alive” mail via its alerting path, so that it gets noticed if mail delivery itself breaks. It said:

“If the mail doesn’t arrive, that’s the finding.”

My follow-up question, verbatim (well, translated):

“is there a monitor on that? or do i have to notice myself?”

Claude’s answer was: Notice it yourself. That was deeply unsatisfying – and with that, the topic was open again.

Because the self-test had exactly the same property as the original problem: Its silent state and its broken state look the same. I’m supposed to notice the difference as a human – and in practice you tend not to notice routine mails that don’t show up. You notice what arrives, not what’s missing.

What I find interesting is the shape of the mistake. It wasn’t a forgotten edge case, but the same problem one level up. The principle was understood, it was even in a comment in the code, and one level down we had deliberately avoided the circularity (the paragraph from earlier). It just wasn’t applied to its own solution.

This probably happens more often than you’d think. For me it turned into an acceptance question that I’ve been asking myself for this kind of thing ever since:

Does what I just built have the same property as the problem it’s supposed to solve?

Who watches the watchmen?

Now to the title of this post: “Who watches the watchmen?” is the English version of “Quis custodiet ipsos custodes?” and comes from Juvenal. The original context isn’t political at all: It’s about having your own wife guarded, and the objection is that she would probably bribe the guards first. The meaning in political theory we know today came later.

Still fits: In my case the watchman isn’t malicious, it just belongs to the same thing as what it’s guarding at the crucial moment.

The obvious worry: If every watchman needs another watchman, where does it end? Turtles all the way down?

For me it ends at two. And for a good reason: The two report via different paths and watch each other:

What failsWho noticesVia which path
Kuma / homelabthe watchman outsidemail and push
The watchman’s mail paththe checker insideKuma → Discord
Homelab and the watchman’s alert paths at the same timenobodydocumented remainder

What’s new is a checker inside. It doesn’t ask “Did the watchman send?”, it checks via IMAP whether the self-test mail actually arrived. That’s more than the self-test alone can show: The self-test tests sending, the checker tests delivery.

The fact that the checker reports via Kuma, i.e. via exactly what the watchman is monitoring, is not a circle. If Kuma is dead, the watchman outside already raises the alarm. The checker only has to cover the case where everything runs normally and just the mail path quietly breaks.

The whole thing does hinge on a detail that was more luck than plan: My Kuma has two notification channels, one via the same mail account as the watchman and one via Discord.

If only mail were set up in Kuma, both would depend on the same account, and the second level would be pointless. This independence wasn’t planned – it was simply already there. But to be safe, I tested once whether it can actually be relied on.

The self-test now runs daily instead of weekly and is deliberately silent. It’s read by a machine, not by me. A broken alerting path thus gets noticed after about two days instead of up to nine.

A routine mail that I’d have to acknowledge as a human will definitely be left lying around at some point. Because a machine checks it, it becomes a simple measurement.

The real thing

On 22 October came the test you can’t plan yourself: Half of Mettmann had a power outage for a good 40 minutes. (Why not everything came back up on its own afterwards is in my post I am the one who boots.)

What the watchman saw is recorded to the minute in its mails:

TimeWhat happened
12:40last sign of life from the homelab, silence afterwards
13:05mail “ALARM SILENCE”: no sign of life for 24 minutes, threshold 20 minutes
13:23power back
15:42servers restarted by hand
16:05first new sign of life
16:10mail “ALL-CLEAR (previously SILENCE)”

That’s exactly how it was meant to work. The watchman outside noticed the silence without needing anything in the house, didn’t alert twice – and gave the all-clear once signals came in again. Six tests in August, and now the seventh, which wasn’t planned.

And Kuma? Did exactly nothing during that time – it was running on one of the servers without power. What’s more interesting is what the status page showed afterwards: For the hours before, almost continuously green bars. The bars are the latest measurements, not time slots.

Where nothing was measured, there’s no bar, and the gap simply collapses. The only hint was a single orange bar in the middle. I couldn’t have demonstrated “A green dashboard proves nothing” any better 😀

One catch remained, though: The alarm mail arrived, but was still sitting unread in the inbox in the afternoon. We noticed the outage the old-fashioned way, because someone was at home. So the watchman delivered, only the last meter to me wasn’t loud enough. For “the mail path is still alive” a mail is exactly right, for “everything in the house is dark” not so much.

I fixed that the same evening: Since then, an alarm additionally sends a push to my phone via ntfy, repeated every 30 minutes until the all-clear comes.

And since I know the question from above pretty well by now: The push path also has its daily, silent self-test, and whether it arrived is checked by a monitor inside again. 😉

What remains

If the homelab and the watchman’s alert paths fail at the same time, nobody notices. That’s not an overlooked gap, but one I know about and have written down here. You can push the probability down further, but probably never to zero. Every chain ends somewhere. For me, the difference is whether I know where, or whether I simply haven’t noticed.

And the other cases from the inventory at the beginning are still on the board. The cards are there, none of them has been started yet…

Anything else?

The pattern isn’t limited to monitoring. It shows up wherever something is supposed to happen regularly and its absence is the failure: The backup that hasn’t run for weeks while the last successful log just sits there. Or the alert channel that simply hasn’t delivered anything for a long time. In cases like that, silence likes to look like “everything’s fine”.

And one more side note: When I go through things like this with Claude, Claude keeps notes on what goes wrong while working and improves its instructions for next time from that. So the watchman for the monitoring was built inside a system that is itself a kind of watchman for its own way of working.

Still, neither of the two found the mistake, but a short follow-up question from me, after everything had been reported as done. That doesn’t argue against automation or AI per se – but it does argue for someone looking at it from the outside every now and then.

Learning:

A monitoring setup that’s running is far from one that’s checking. And anyone who builds a watchman should take a look right away at who is actually watching its alert path.


Image credit: surveillance cameras by Matthew Long and Judy Murphy / freepngimg.com, license CC BY-NC 4.0, combined by me. Graphics: my own.

This post was originally published in German on 5 November 2026.
The original post can be found here: Quis custodiet ipsos custodes?

AI Dead-Man-Switch Homelab Monitoring ntfy Proxmox Self-Hosted Uptime Kuma

Kommentar schreiben

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert. Kommentare erscheinen nach Freischaltung.

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre, wie deine Kommentardaten verarbeitet werden.