We are excited to announce a new inclusion in Canonical’s Observability ecosystem. In the recent months, we have created a charm for Sloth, one of the most popular open-source tools available for generating Service Level Objective expressions that work with Prometheus.
SLIs, SLOs, and the error budget
A Service Level Indicator (SLI) is a quantitative measure of some aspect of a service’s behaviour - for example, the fraction of HTTP requests that succeed, or the fraction of database queries completed within 100 ms.
A Service Level Objective (SLO) is a target value (or range) for an SLI. An example of an SLO might be “99.9% of HTTP requests succeed over a rolling 30-day window.”. In large organisations, SLOs give engineering and business teams a shared, data-driven language for discussing and prioritising reliability work.
An error budget is the allowed amount of unreliability implied by the SLO. If your SLO is 99.9%, then 0.1% of requests may fail - that is your error budget. When the error budget is depleted, it signals that the service has been more unreliable than the agreed target and that remediation should be prioritised.
These concepts are described in depth in the Google SRE book and the Google SRE Workbook. To assess the actual error budget your desired availability would result in, we advise you to have a look at https://uptime.is/
sloth-k8s-operator
sloth-k8s-operator is a charm that wraps the Sloth SLO generator to convert SLO specs into recording and alerting rules pushed to Prometheus / Mimir. It also comes with a set of predefined Grafana dashboards that help you visualize the objectives and the current state of the system:
It integrates with the Canonical Observability Stack so you can define the expressions either in your charm or using cos-configuration-k8s and once integrated, the expression results will show up in your Prometheus / Mimir as well as in Grafana.
How do I start?
The easiest way is to navigate to the Charmed Sloth documentation and start experimenting with SLOs!
Where to find us
You can find the Observability team here on Discourse as well as on Matrix. We also host office hours every week with times friendly to EMEA and Americas.

