Using Sloth and Pyrra for SLOs
Sloth (https://github.com/slok/sloth) and Pyrra (https://github.com/pyrra-dev/pyrra) are two open source projects that are both designed to assist in the definition of SLOs using Prometheus data and the generation of the requisite recording and alerting rules for them. Both projects work by abstracting away the direct definition of recording and alerting rules and instead using their own YAML formats to help define SLOs.
Both projects have been around since 2021, so neither has a clear edge in terms of maturity. Pyrra is still under more active development than Sloth, as Sloth’s maintainer has stated that they consider Sloth to be more-or-less in its final form and don’t plan on adding new features. Take that as you will, but either project is a good and valid choice on your Prometheus SLO journey. Consequently, we’ll look at the basics of both.
Sloth
Sloth works by generating the appropriate recording rules and alerting...