Chat-ops from a phone
Running a lab you cannot see means finding out about failures at the worst possible time — or, worse, not finding out at all.
- automation
- proxmox
- Interface
- Telegram
- Brief
- Daily, 07:30
- Self-heal
- Scripted, logged
- Verifier
- Checks outcomes
A homelab does not have an operations team. It has one person, who is usually doing something else. The practical consequence is that the interface matters more than the tooling: a dashboard I have to remember to open is a dashboard I will not open.
So the lab talks to me instead, over the messaging app I already have on my phone.
Three things, in order of usefulness
A morning brief. At half past seven every day a message arrives with the state of everything: node health, storage capacity, backup freshness, certificate expiry, container updates pending, anything that changed overnight. Two minutes of reading replaces opening five web interfaces, and because it arrives whether or not anything is wrong, its absence is itself a signal.
Self-healing with a paper trail. A set of scripted remediations handle the failures that are boring and recurring — a container that has wedged, a service that needs a restart, a mount that dropped. Each one acts, logs what it did, and reports it. The reporting is the important half. Automation that silently fixes things trains you to stop understanding your own system.
Two-way commands. I can ask for status, trigger a specific job, or kick off a deployment from my phone. This gets used far less than the other two, but when it gets used it is usually because I am not at home and something needs doing now.
The part that actually mattered
The first version of all this told me that jobs had run. It took an embarrassingly long time to notice this is nearly worthless.
A backup script that exits zero having backed up nothing is a successful run and a total failure. A sync job whose source path changed will happily synchronise an empty directory forever, exit cleanly, and report success every morning. I had at least one job doing exactly this and the reporting looked perfect throughout.
The fix was a separate verifier that ignores exit codes entirely and checks for outcomes:
- Does the backup file exist, and is it newer than the last run?
- Is the snapshot count increasing?
- Does the endpoint that was supposed to be deployed actually answer?
- Is the destination the expected size, rather than suspiciously small?
It runs before the morning brief and its findings go straight into it. It has caught several silent no-ops that the ordinary monitoring reported as green, which is precisely the class of failure that eats backups.
Alert fatigue
The other thing that needed fixing was volume. Some services in the lab are experimental and flap constantly; alerting on them at the same priority as a storage fault meant learning to ignore alerts, which is the worst possible outcome for a monitoring system.
Alerts are now tiered. Infrastructure failures interrupt. Experimental things accumulate quietly and appear in the morning brief. The number of notifications went down by roughly an order of magnitude and the number I actually read went up to all of them.
What I would change
Less than I expected. The main thing I would do differently is build the outcome verifier first, rather than bolting it on after discovering that “ran successfully” and “worked” are different claims.