Monitoring and recovery for servers and production PCs
I set up scheduled checks for servers, switches, printers and production PCs. The jobs report changes, attempt specific repairs where allowed, and alert me when someone needs to intervene.
Results
56scheduled jobs on one Linux workstation
5checks before a smart plug cuts power
22workstations checked for overdue reboots
The problem
Some faults went unnoticed or misdiagnosed for months. A managed switch kept passing traffic while its management interface was hung, and a Mac had no working wired connection. When a print workstation froze, someone on site had to notice and pull the power.
What I did
- Systemd timers for health checks, self-repairs and backups, plus a weekly scan that flags new hosts and open ports.
- Alerts on state changes, with messages queued during an internet outage and sent when the connection returns.
- Smart-plug recovery for production PCs that hard-hang. The configured checks must pass before power is cut. Repeated failures stop automatic recovery and request a physical cord pull.
- Added checks for recurring faults. When the business database's web API stopped after an automatic update, I added detection and recovery for that failure.
What I took from it
I traced 619 restarts and 612 crashes on a print workstation to our own watchdog. I added limits and reason logs to recovery scripts so I can see whether the fix is causing trouble.