Sloth's readme claims continuous development over a six-month release gap, and its plugins run in an embedded interpreter
🦥 Easy and simple Prometheus SLO (service level objectives) generator
At a glance
- What is it?
- A service level objective generator written in Go whose twenty direct dependencies include an embedded Go interpreter and a second vendor's query dialect, whose version comes from a git description, and whose chart ships as a separate release.
- Who is it for?
- This is a small, well-scoped tool that solves one problem properly, and its example directory is better documentation than most projects manage. The design to understand before adopting it is the plugin model, because a plugin is interpreted code running inside your alerting pipeline.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 26 days ago.
- What is it written in?
- Mainly Go, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 23, 2026, and from our analysis. They are not legal advice.
Star history
- slok/sloth2,576 ★ · +26
| Repository | 2026-09-30 | 2026-11-23 |
|---|---|---|
| slok/sloth | 2.6k | 2.6k |
26 Stars in the last 54 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The status section and the release list describe different clocks
There is a project status section near the top, and it is short. It says the project is actively maintained and in continuous development, that work is under way on extensibility and adaptability, that custom indicator plugins are already supported, and that upcoming changes will make objective generation more flexible. It ends by promising updates.
Then look at the release list. Two tags six months apart on the main line, a minor release in late October one year and a feature release the following April, plus a chart release published forty-three minutes after that April tag. The most recent commit is about a month after the newest release.
So the page asserts continuous development and the release list shows roughly two feature releases a year. Both can be true, and they usually are: a maintained project ships continuously in the sense that work lands regularly, and a tool like this has no reason to cut a release for anything short of a user-visible change. But a reader sizing their upgrade risk should use the tags, not the sentence.
The status section is also doing something subtle. It promises that the plugin system will become more flexible, which is a warning that the plugin interface you build against today may move. For a plugin that has to keep working against your Prometheus rules for a year, that is the sentence in the readme worth rereading before you write one.
The plugins run in an embedded interpreter
The feature list has a bullet for custom indicator plugins and another for a library of common ones in a separate repository, and the readme points at both the plugin documentation and that separate repository.
What the module file adds is the mechanism. Among roughly two dozen direct dependencies there is an embedded Go interpreter, published as a library. That is how a plugin written in Go can be loaded at runtime without being compiled into the binary.
Which makes the plugin model the most security-relevant thing on the page. A plugin is code you did not compile, running inside the process that generates your alerting rules, on a machine that can reach your metrics and your cluster. The readme does not say what is sandboxed, because in an interpreter inside the same process, probably nothing is.
That is not a criticism of the design, which is a common and reasonable one, and the fact that the module file shows an interpreter rather than a plugin protocol means you can see what you are agreeing to. It just belongs in the mental model of whoever decides whether an indicator plugin from a community repository goes into production.
The rest of the dependency list is unremarkable for the job: a Prometheus client, the common configuration package, three packages from the operator's project, the Prometheus server module itself, a router, a CLI parser, a structured logging library, a fuzzy search library, two small libraries by the same author, and the Kubernetes client libraries.
The default windows are thirty and twenty-eight days, described as safe
One feature bullet says the tool ships safe period windows of thirty and twenty-eight days by default, and that they are customizable for advanced use cases.
Those two numbers are not arbitrary and the feature list does not say why, but the alert scheme in the rest of the page implies it. A multi-window burn-rate scheme needs at least two windows so it can compare a short one against a long one and page on both while warning on the combination. Thirty days is the natural long window for a monthly objective. Twenty-eight exists because monthly boundaries do not line up with a clean month, so a twenty-eight-day window is what you want for the arithmetic.
sloth generate -i ./examples/getting-started.ymlThe design principle behind them is stated elsewhere on the page and is worth repeating because it is the reason the tool exists: the objective, the recording rules, the metadata rules and the alerts are all generated from one spec, so every service gets the same treatment. A uniform scheme across teams is the feature, and the windows are the part of the scheme that everyone inherits without choosing.
Which is exactly why the customization bullet is worded carefully. It says customizable, for advanced use cases, and not much else. Anyone changing those windows is changing what their burn rates mean across the whole organisation, and the readme does not pretend otherwise.
Nineteen example files arranged as a feature matrix, with generated output committed beside it
The examples directory is the best part of the repository and it is not mentioned in the readme at all.
There are nineteen visible files and they form a matrix rather than a list. Each row is a feature and each column is a deployment shape. Getting started, and the same spec with plugins. Single file and multi file. Plain Prometheus and the operator with custom resource definitions. The native format and the open specification format. One example written for a different vendor's query dialect. One called no alerts. One called contributor denominator corrected, and one called contributor plugin. One called home wifi, and a raw variant of it. Two called plugin. And a directory for Windows.
Three things follow from reading the filenames.
The generated output is committed. There is a directory whose name marks it as generated, and the readme links one input file and the corresponding output so you can see the transformation side by side. That is the documentation a code generator should have.
The home wifi example is the most informative one. A wireless network at home is not an HTTP service, so if the tool can express that as an indicator, the plugin model is not limited to web services.
And the matrix means the feature surface is small and well covered. Nineteen files for a tool that generates rules is a project that tests its own claims by example.
The build version is a git description and the chart releases separately
Two details in the build file that a packager should know.
The first is the version. It defaults to the output of a git description that asks for tags and falls back to always printing something. That is the right default for a project that releases by tag. It also means a build from a shallow clone, or from a source archive, produces a version string that is a commit hash rather than a number, and nothing downstream complains.
Every build target then passes that version into a shell script under the build scripts directory. So the makefile is a thin, readable layer: it defines the command for each artefact once, passes variables as environment, and delegates. There are build scripts for a single binary, for all architectures, for the development image, for the production image, for publishing, and for publishing across all architectures.
The second detail is the release list. Two of the three most recent tags are the same version number: the tool's own tag, and a chart tag whose name is prefixed to say it is the chart. They were published forty-three minutes apart, on the same day, in April.
So the Helm chart is versioned independently and released on its own schedule, and it happens to be tracking the same number. For anyone automating an upgrade, those are two release streams to watch, and the one that actually changes how your alerting rules are generated is the binary.
The check suite is six shell scripts and the dev container branches on the host's uname
The check side of the build file follows the same delegation pattern, and it is worth reading because it tells you what the project considers its contract.
There are six scripts. One runs the unit tests. One runs integration tests. One runs integration tests against a cluster. One runs integration tests of the command line. One tests the Helm chart. And one is the aggregate check that the others presumably call.
So there are four distinct kinds of test beyond unit tests, and the distinction between the plain integration suite and the cluster suite tells you that the generated rules are verified both as data and as something applied to a real API server.
The development container is where it gets interesting. The variable holding the operating system type is computed by calling uname with no flags, which returns a string containing the kernel name and the machine, and that value is passed into the container as an environment variable, with the working directory bind-mounted. So the build environment is told what host it came from rather than detecting it itself.
That is the mechanism behind the Windows directory in the examples, incidentally. A tool that generates line endings and path-dependent output needs to know the target, and the answer here is passed in from the makefile.
Two images are defined: one local development image and one production image with a registry prefix, which matches the publish targets in the release script.
Editorial conclusion
This is a small, well-scoped tool that solves one problem properly, and its example directory is better documentation than most projects manage. The design to understand before adopting it is the plugin model, because a plugin is interpreted code running inside your alerting pipeline. The operational thing to know is the version story: the manifest derives the build number from the git description, so a shallow clone produces a hash, and the Helm chart is versioned and released on its own clock.
Frequently asked questions
What does Sloth do?
It generates Prometheus service level objectives from a compact specification, producing indicator recording rules across several time windows, objective metadata rules, and page and warning alerts on a multi-window multi-burn rate scheme, following a published site reliability guide.
How does Sloth support custom indicators?
Through plugins, with a separate repository of common ones and documentation on the plugin interface. The module file's dependency list includes an embedded Go interpreter, which is how plugin source is loaded at runtime, and the examples directory ships plugin variants of the getting-started specification.
What are Sloth's default period windows?
Thirty and twenty-eight days, described in the feature list as safe defaults, and customizable for advanced use cases. They are the two windows the multi-window burn-rate alert scheme compares, so changing them changes what every burn rate means across an organisation.
Does Sloth only work with Prometheus?
No. It targets plain Prometheus, the Kubernetes operator with custom resource definitions, a second vendor's query dialect with a matching example file, and the open SLO specification format with two example files. A worked example for a home wireless network shows the plugin model is not limited to web services.
How is the Sloth build version determined?
The makefile's version variable defaults to a git description that asks for tags and falls back to printing something, so a shallow clone or a source archive yields a commit hash rather than a number. The Helm chart is versioned and released on its own schedule, with its newest tag published the same day as the matching binary tag.
Official sources
Where developers are discussing it
Posts on Hacker News, dev.to and Lobsters that link to this repository, found by our scan of those communities. 1 in the last 30 days; newest first.
- Don't Wait for the Status Page: Multi-Window Burn-Rate Alerts in Under 70 Lines of Pythondev.to · Nov 2, 2026 · 2 points · 0 comments
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/slok-sloth)Star history chart for your README
[](https://hysenlabs.com/projects/slok-sloth)Was this useful?