Projects / 2026

slowlog

A rate-limited log sampler for small machines that cannot afford a full observability stack.

experimental Gojournaldsystemd

slowlog is a small daemon that reads journald, groups repeated messages, and forwards a sampled summary. It is designed for the class of machine that has 1 GB of RAM and no business running a log pipeline.

Why

A noisy service can produce thousands of identical lines during an incident. Shipping all of them is expensive; shipping none of them is blind. The useful signal is usually the shape of the repetition: which message, how often, and when it started.

slowlog keeps a small in-memory table of message fingerprints, counts them, and emits one line per interval with the count and the first/last timestamp.

How it works

input:  journald (via journalctl -f -o json)
group:  normalized message + unit + priority
output: one summary line per window, plus the first sample

Example output:

2026-11-04T12:01:03Z slowlog unit=nginx priority=err
  count=1842 window=60s first=12:00:03 last=12:01:02
  sample="upstream timed out (110: Connection timed out)"

The first sample is kept so you can see the actual message; the count tells you whether it is a one-off or a flood.

Status

Experimental. The grouping works, the sampling is conservative, and the configuration surface is intentionally tiny. It is not a replacement for a real log system, and it does not try to parse structured fields beyond the journal envelope.

Notes

Sampling changes what you see. Keep the raw journal for a short retention window, and make sure the sampler itself is monitored. A log pipeline that silently stops is worse than no pipeline at all.