the internet's box_

log / Technology / Servers & containers

Part 1 of 3 in Hosting platform · series 1 (Dec 2026, ongoing)
next: Catching TLS certificate expiry before it becomes an outage

· build log #monitoring #servers #oom #memory #swap

Adding memory pressure and OOM-kill checks to a host status command

What happened

I extended a host check command with memory pressure and OOM-kill checks. I wanted an early warning for memory problems. It should also tell me when it's time to move to a bigger host.

The fix / What I built

I added three new checks:

The thresholds are simple:

Why it works

Disk and container-state checks only show the symptom. By the time a container has restarted several times, the memory problem has been going on for a while. Available memory and swap show the pressure building up. The kernel log records an OOM kill even if the container came back on its own and looks healthy now.

A window of several days means a kill that happened over a weekend still shows up on Monday. Failing on any OOM kill is deliberately strict. On a small host, I want to hear about every one.

The lesson is to watch memory pressure and OOM events directly. Don't wait for the downstream symptoms.