Running in production · Edition No. 56 · 20 Oct 2026

slok/sloth

Generates Prometheus alerting and recording rules from a short specification of a service level objective.

← Running in productionRead the whole edition →
02

slok/sloth

💎 hidden gem
Sloth: uptime promises into alert rules. Writes the alert rules behind a service promise.

2.6k stars · Apache-2.0 | [sloth.dev](https://sloth.dev) · v0.16.0 (2026-04-04) · Track this in Scout

Generates Prometheus alerting and recording rules from a short specification of a service level objective.

▶Repo detailsthe review · specs · pros & cons · install

What it does

You write a small YAML file saying what you are measuring and what the objective is — 99.9 per cent availability, say. Sloth reads it and generates the Prometheus rules: recording rules that compute the error rate over several time windows, metadata rules about the objective itself, and multi-window multi-burn-rate alerts at two severities, one that pages somebody and one that only warns. The default windows are 30 and 28 days, and both can be changed. It ships as a single binary with a generate command and a validate command, which is the one you put in a continuous-integration job so a broken specification never reaches the cluster. For Kubernetes there are two routes: generating rules for the Prometheus Operator, or running it as a controller with its own custom resources. Labels are customisable, alert types can be switched off, custom measurement plugins are supported, and it reads the OpenSLO specification as well as its own. A Grafana dashboard for viewing the result is published with it. It does not collect anything and it does not alert anything: Prometheus does both, and Sloth only writes the rules Prometheus runs.

Why it matters

Who it suits. Anyone already running Prometheus who has alerts that fire too often, or not at all, because nobody wanted to do the burn-rate arithmetic by hand. It is also the cheapest way to make a service promise concrete, since the promise becomes a file in version control that a job can check. Skip it if you do not use Prometheus, because everything it produces is Prometheus-shaped, and skip it if you have no measurements worth alerting on yet — this writes the rules, it cannot invent the data.

Verdict. Worth an hour, and at 2,600 stars it is the most undervalued thing in this edition. The multi-window multi-burn-rate pattern is well known and genuinely hard to hand-write correctly; a generator removes a whole class of quiet mistakes. Two caveats. Release v0.16.0 is dated 4 April 2026, about six and a half months ago, and ungh.cc refused this repository today, so that release and its 991 commits are what the currency rests on — a slow rhythm for a tool whose output you then own, which is tolerable but worth knowing. And the project's own status note says it is still working on making generation more flexible, which is a polite way of saying the current customisation has edges. Compare with pyrra-dev/pyrra, which does the same job and adds a web interface.

Stars2.6k
LicenceApache-2.0 | [sloth.dev](https://sloth.dev)
Latestv0.16.0 (2026-04-04)
Good
  • Writes the multi-window multi-burn-rate alert rules correctly, which is the part people get wrong by hand.
  • A validate command, so a bad specification fails in a continuous-integration job rather than in production.
  • One binary, plus a Kubernetes operator route and a published Grafana dashboard, under Apache-2.0.
Watch for
  • Useless without Prometheus: every output is a Prometheus rule.
  • One release in the last six months, and no install instructions at all on the repository page.
  • The project says generation is not yet as flexible as it intends, so unusual objectives still mean hand-editing the output.
Similar repositories
Install
# Binary: https://github.com/slok/sloth/releases/latest
# Then, from a clone of the repository:
sloth validate -i ./examples/getting-started.yml
sloth generate -i ./examples/getting-started.yml > slo-rules.yml
Screenshots
slok/sloth: Screenshot 1

On Stack Radar: Infrastructure & Security › Monitoring & Reliability › Uptime Monitoring.

Get the next edition in your inbox

A dozen repositories, opened and checked. The licence read, the last release dated, and the ones that did not make it named with the reason. It is the half most lists leave out.

No tracking pixels. One click to leave. The archive stays free either way.

We use your address to send the edition and nothing else. Confirm by email, leave in one click. How we handle it.