Watching small VPSes without drowning in emails
Our software runs on a handful of small VPSes, none with much RAM to spare. One day someone happened to check one by hand: it was close to running out of memory. Nobody would have known until an instance slowed down or refused to start. So I taught our internal admin panel to look for itself.
Read-only, on purpose
Every five minutes the panel connects to each server over SSH with a key that can run exactly one command, a small helper that prints a JSON snapshot: memory, swap, disk, load, the database and web server, and every app instance on the host with its own memory. No shell, no write access. If the key ever leaked, the worst anyone could do is ask how much RAM is free.
Two levels, decided once
Warning when available memory drops below a floor, disk goes over 85% or swap over 50%; critical at half that floor, disk over 95%, or the database or web server down. The thresholds live in configuration, not in code, and each server’s page shows the ones in use.
Alerts that don’t spam
A value hovering around a threshold would send an email every five minutes. So an alert goes out only when the state changes, and only after two readings in a row agree. A failed reading doesn’t change the state at all: “I couldn’t read it” is not the same as “it’s fine” or “it’s on fire”, and the page says so in grey.
Pages you can decide with
Each server has a page with bars and the threshold marked on them, the instances it hosts, and the worst moment of each of the last seven days. When someone creates a new instance, the form warns if the chosen server is already struggling.
What I learned
A monitoring tool lives or dies by what it doesn’t send. Hysteresis, “unknown” states and a clear “this reading is old” matter as much as the checks themselves.




