---
# Code generated by Sloth (dev): https://github.com/slok/sloth.
# DO NOT EDIT.
groups:
- name: sloth-slo-sli-recordings-myapp-http-availability
rules:
- record: slo:sli_error:ratio_rate5m
expr: |
(sum(
rate(http_request_duration_seconds_count{job="myapp", code=~"(5..|429)"}[5m])
)
)
/
(sum(
rate(http_request_duration_seconds_count{job="myapp"}[5m])
)
)
labels:
cmd: examplesgen.sh
owner: myteam
sloth_id: myapp-http-availability
sloth_service: myapp
sloth_slo: http-availability
sloth_window: 5m
- record: slo:sli_error:ratio_rate30m
expr: |
(sum(
rate(http_request_duration_seconds_count{job="myapp", code=~"(5..|429)"}[30m])
)
)
/
(sum(
rate(http_request_duration_seconds_count{job="myapp"}[30m])
)
)
labels:
cmd: examplesgen.sh
owner: myteam
sloth_id: myapp-http-availability
sloth_service: myapp
sloth_slo: http-availability
sloth_window: 30m
- record: slo:sli_error:ratio_rate1h
expr: |
(sum(
rate(http_request_duration_seconds_count{job="myapp", code=~"(5..|429)"}[1h])
)
)
/
(sum(
rate(http_request_duration_seconds_count{job="myapp"}[1h])
)
)
labels:
cmd: examplesgen.sh
owner: myteam
sloth_id: myapp-http-availability
sloth_service: myapp
sloth_slo: http-availability
sloth_window: 1h
- record: slo:sli_error:ratio_rate2h
expr: |
(sum(
rate(http_request_duration_seconds_count{job="myapp", code=~"(5..|429)"}[2h])
)
)
/
(sum(
rate(http_request_duration_seconds_count{job="myapp"}[2h])
)
)
labels:
cmd: examplesgen.sh
owner: myteam
sloth_id: myapp-http-availability
sloth_service: myapp
sloth_slo: http-availability
sloth_window: 2h
- record: slo:sli_error:ratio_rate6h
expr: |
(sum(
rate(http_request_duration_seconds_count{job="myapp", code=~"(5..|429)"}[6h])
)
)
/
(sum(
rate(http_request_duration_seconds_count{job="myapp"}[6h])
)
)
labels:
cmd: examplesgen.sh
owner: myteam
sloth_id: myapp-http-availability
sloth_service: myapp
sloth_slo: http-availability
sloth_window: 6h
- record: slo:sli_error:ratio_rate1d
expr: |
(sum(
rate(http_request_duration_seconds_count{job="myapp", code=~"(5..|429)"}[1d])
)
)
/
(sum(
rate(http_request_duration_seconds_count{job="myapp"}[1d])
)
)
labels:
cmd: examplesgen.sh
owner: myteam
sloth_id: myapp-http-availability
sloth_service: myapp
sloth_slo: http-availability
sloth_window: 1d
- record: slo:sli_error:ratio_rate3d
expr: |
(sum(
rate(http_request_duration_seconds_count{job="myapp", code=~"(5..|429)"}[3d])
)
)
/
(sum(
rate(http_request_duration_seconds_count{job="myapp"}[3d])
)
)
labels:
cmd: examplesgen.sh
owner: myteam
sloth_id: myapp-http-availability
sloth_service: myapp
sloth_slo: http-availability
sloth_window: 3d
- record: slo:sli_error:ratio_rate30d
expr: |
sum_over_time(slo:sli_error:ratio_rate5m{sloth_id="myapp-http-availability", sloth_service="myapp", sloth_slo="http-availability"}[30d])
/ ignoring (sloth_window)
count_over_time(slo:sli_error:ratio_rate5m{sloth_id="myapp-http-availability", sloth_service="myapp", sloth_slo="http-availability"}[30d])
labels:
cmd: examplesgen.sh
owner: myteam
sloth_id: myapp-http-availability
sloth_service: myapp
sloth_slo: http-availability
sloth_window: 30d
- name: sloth-slo-meta-recordings-myapp-http-availability
rules:
- record: slo:objective:ratio
expr: vector(0.9998999999999999)
labels:
cmd: examplesgen.sh
owner: myteam
sloth_id: myapp-http-availability
sloth_service: myapp
sloth_slo: http-availability
- record: slo:error_budget:ratio
expr: vector(1-0.9998999999999999)
labels:
cmd: examplesgen.sh
owner: myteam
sloth_id: myapp-http-availability
sloth_service: myapp
sloth_slo: http-availability
- record: slo:time_period:days
expr: vector(30)
labels:
cmd: examplesgen.sh
owner: myteam
sloth_id: myapp-http-availability
sloth_service: myapp
sloth_slo: http-availability
- record: slo:current_burn_rate:ratio
expr: |
slo:sli_error:ratio_rate5m{sloth_id="myapp-http-availability", sloth_service="myapp", sloth_slo="http-availability"}
/ on(sloth_id, sloth_slo, sloth_service) group_left
slo:error_budget:ratio{sloth_id="myapp-http-availability", sloth_service="myapp", sloth_slo="http-availability"}
labels:
cmd: examplesgen.sh
owner: myteam
sloth_id: myapp-http-availability
sloth_service: myapp
sloth_slo: http-availability
- record: slo:period_burn_rate:ratio
expr: |
slo:sli_error:ratio_rate30d{sloth_id="myapp-http-availability", sloth_service="myapp", sloth_slo="http-availability"}
/ on(sloth_id, sloth_slo, sloth_service) group_left
slo:error_budget:ratio{sloth_id="myapp-http-availability", sloth_service="myapp", sloth_slo="http-availability"}
labels:
cmd: examplesgen.sh
owner: myteam
sloth_id: myapp-http-availability
sloth_service: myapp
sloth_slo: http-availability
- record: slo:period_error_budget_remaining:ratio
expr: 1 - slo:period_burn_rate:ratio{sloth_id="myapp-http-availability", sloth_service="myapp",
sloth_slo="http-availability"}
labels:
cmd: examplesgen.sh
owner: myteam
sloth_id: myapp-http-availability
sloth_service: myapp
sloth_slo: http-availability
- record: sloth_slo_info
expr: vector(1)
labels:
cmd: examplesgen.sh
owner: myteam
sloth_id: myapp-http-availability
sloth_mode: cli-gen-prom
sloth_objective: "99.99"
sloth_service: myapp
sloth_slo: http-availability
sloth_spec: prometheus/v1
sloth_version: dev