slo-generator
Easily setup a service level objective using prometheus, based on lessons from the SRE workbook.
Alert methods currently supported
- 1. Target Error Rate ≥ SLO Threshold
- 2. Increased Alert Window
- 3. Incrementing Alert Duration
- 4. Alert on Burn Rate
- 5. Multiple Burn Rate Alerts
- 6. Multiwindow, Multi-Burn-Rate Alerts
Generating
Look the file slo_example.yml to see how to parametrize SLOs and generate Prometheus rules by running the following command:
slo-generator -slo.path=slo_example.yml -rule.output rule.yml
SLOs at scale
The Workbook suggests to create classes to simplify how to set a SLO for your services, read details about concepts here
Look at slo_example_with_classes.yml and slo_classes.yml to see how to define classes and associate with your services.
After that, you can run the command specifying the classes:
slo-generator -slo.path=slo_example_with_classes.yml -classes.path slo_classes.yml -rule.output rule.yml
Grafana integration
All generated SLOs are visible by grafana:

Import dashboard using following JSON files