AI SRE

I built the on-call log review I used to do by hand into a service. It reads Loki logs across five hosts, writes a prioritized incident report through Claude, and — the part that makes it more than a summarizer — remembers open issues across runs so every report tells me what's new, still ongoing, or newly resolved.

This is not a chat window pointed at logs. It's a FastAPI service on the monitoring VM with an issue-ledger, false-alarm guards, and cron schedules — the same operational rigor I apply to production pipelines at work, on infrastructure I own and can talk about freely.

By the numbers

5
hosts read each run (pve, opnsense, nginx, dockge, monitor)
4
cron schedules: 6h · daily · weekly · hourly nginx watch
ledger
cross-run memory: NEW / ONGOING-since / RESOLVED
Claude
Sonnet reads the logs like an on-call human

What it is

A single-file FastAPI service (ai-sre-api) sitting between Grafana Loki and the Anthropic Messages API. Logs from five sources ship into one Loki instance; the service pulls the relevant lines with LogQL and asks a Claude model to interpret them as a Site Reliability Engineer would. The whole stack — Loki, Promtail, and the API — is three containers defined by one docker-compose.yml, running on a 4 GB Proxmox VM.

Log ingestion is deliberately heterogeneous, because real infrastructure is: Promtail on the Linux hosts, OPNsense via remote syslog to a receiver, Proxmox via journald→Promtail, and the nginx box shipping parsed access logs. It all lands in Loki under a coarse, queryable label scheme.

The standout: cross-run memory

An LLM summarizing a time window is stateless — run it twice and it re-reports the same disk warning as if it were new every time. That's noise, and noise gets ignored. So each scheduled run carries a persistent issue-ledger:

<!-- SRE-LEDGER-BEGIN -->
| id                           | host | first_seen | last_seen  | status  | priority | summary
| pve-smart-drive-degradation  | pve  | 2026-07-01 | 2026-07-05 | ONGOING | P2       | /dev/sdc SMART prefailure escalating
<!-- SRE-LEDGER-END -->

This is context engineering applied to observability: state persisted between otherwise-stateless calls so the reports build on each other instead of analyzing every window cold.

Engineering against LLM failure modes

Most of the hard work was making a language model behave like a trustworthy monitor instead of an anxious one. Each of these fixes a specific failure I watched it make:

Operational rigor

Why it matters (the wedge)

Everyone in 2026 can point an LLM at a log file. The leverage is in the parts that make it operable: memory so alerts aren't repeated, guards so it doesn't cry wolf, budgets so it doesn't cost a fortune, and schedules so it runs whether or not I'm watching. That's twenty years of build/release discipline aimed at a new tool — and it's the same shape as the AI pipelines I run at work, just on infrastructure I can show you.