Generating SLO rules for Prometheus

Generating SLO rules for Prometheus

We want to use SLOs in Prometheus and a lot of the alerting rules and recording rules are quite some repetition, so we can use Jsonnet to generate Prometheus files.

Matthias Loibl

November 07, 2019

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

19 slides
  1. alert: ErrorBudgetBurn expr: ( status_class_5xx:http_requests_total:ratio_rate1h{job="prometheus"} > (14.4*0.001000) and status_class_5xx:http_requests_total:ratio_rate5m{job="prometheus"} >

    (14.4*0.001000) ) or ( status_class_5xx:http_requests_total:ratio_rate6h{job="prometheus"} > (6*0.001000) and status_class_5xx:http_requests_total:ratio_rate30m{job="prometheus"} > (6*0.001000) )
  2. local slo = import '../slo-libsonnet/slo.libsonnet'; { local errorburnrate = slo.errorburn({

    metric: http_requests_total, selectors: ['job="prometheus"'], errorBudget: 1-0.99, }), rules: errorburnrate.recordingrules + errorburnrate.alerts, }

More Decks by Matthias Loibl

Other Decks in Technology