---
# Code generated by Sloth (dev): https://github.com/slok/sloth.
# DO NOT EDIT.
groups:
- name: sloth-slo-sli-recordings-home-wifi-good-wifi-client-satisfaction
rules:
- record: slo:sli_error:ratio_rate5m
expr: |
(sum_over_time((count(unifipoller_client_satisfaction_ratio < 0.75))[5m:]) OR on() vector(0))
/
(sum_over_time((count(unifipoller_client_satisfaction_ratio))[5m:]))
labels:
cluster: valhalla
cmd: examplesgen.sh
component: ubiquiti
context: home
sloth_id: home-wifi-good-wifi-client-satisfaction
sloth_service: home-wifi
sloth_slo: good-wifi-client-satisfaction
sloth_window: 5m
- record: slo:sli_error:ratio_rate30m
expr: |
(sum_over_time((count(unifipoller_client_satisfaction_ratio < 0.75))[30m:]) OR on() vector(0))
/
(sum_over_time((count(unifipoller_client_satisfaction_ratio))[30m:]))
labels:
cluster: valhalla
cmd: examplesgen.sh
component: ubiquiti
context: home
sloth_id: home-wifi-good-wifi-client-satisfaction
sloth_service: home-wifi
sloth_slo: good-wifi-client-satisfaction
sloth_window: 30m
- record: slo:sli_error:ratio_rate1h
expr: |
(sum_over_time((count(unifipoller_client_satisfaction_ratio < 0.75))[1h:]) OR on() vector(0))
/
(sum_over_time((count(unifipoller_client_satisfaction_ratio))[1h:]))
labels:
cluster: valhalla
cmd: examplesgen.sh
component: ubiquiti
context: home
sloth_id: home-wifi-good-wifi-client-satisfaction
sloth_service: home-wifi
sloth_slo: good-wifi-client-satisfaction
sloth_window: 1h
- record: slo:sli_error:ratio_rate2h
expr: |
(sum_over_time((count(unifipoller_client_satisfaction_ratio < 0.75))[2h:]) OR on() vector(0))
/
(sum_over_time((count(unifipoller_client_satisfaction_ratio))[2h:]))
labels:
cluster: valhalla
cmd: examplesgen.sh
component: ubiquiti
context: home
sloth_id: home-wifi-good-wifi-client-satisfaction
sloth_service: home-wifi
sloth_slo: good-wifi-client-satisfaction
sloth_window: 2h
- record: slo:sli_error:ratio_rate6h
expr: |
(sum_over_time((count(unifipoller_client_satisfaction_ratio < 0.75))[6h:]) OR on() vector(0))
/
(sum_over_time((count(unifipoller_client_satisfaction_ratio))[6h:]))
labels:
cluster: valhalla
cmd: examplesgen.sh
component: ubiquiti
context: home
sloth_id: home-wifi-good-wifi-client-satisfaction
sloth_service: home-wifi
sloth_slo: good-wifi-client-satisfaction
sloth_window: 6h
- record: slo:sli_error:ratio_rate1d
expr: |
(sum_over_time((count(unifipoller_client_satisfaction_ratio < 0.75))[1d:]) OR on() vector(0))
/
(sum_over_time((count(unifipoller_client_satisfaction_ratio))[1d:]))
labels:
cluster: valhalla
cmd: examplesgen.sh
component: ubiquiti
context: home
sloth_id: home-wifi-good-wifi-client-satisfaction
sloth_service: home-wifi
sloth_slo: good-wifi-client-satisfaction
sloth_window: 1d
- record: slo:sli_error:ratio_rate3d
expr: |
(sum_over_time((count(unifipoller_client_satisfaction_ratio < 0.75))[3d:]) OR on() vector(0))
/
(sum_over_time((count(unifipoller_client_satisfaction_ratio))[3d:]))
labels:
cluster: valhalla
cmd: examplesgen.sh
component: ubiquiti
context: home
sloth_id: home-wifi-good-wifi-client-satisfaction
sloth_service: home-wifi
sloth_slo: good-wifi-client-satisfaction
sloth_window: 3d
- record: slo:sli_error:ratio_rate30d
expr: |
sum_over_time(slo:sli_error:ratio_rate5m{sloth_id="home-wifi-good-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="good-wifi-client-satisfaction"}[30d])
/ ignoring (sloth_window)
count_over_time(slo:sli_error:ratio_rate5m{sloth_id="home-wifi-good-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="good-wifi-client-satisfaction"}[30d])
labels:
cluster: valhalla
cmd: examplesgen.sh
component: ubiquiti
context: home
sloth_id: home-wifi-good-wifi-client-satisfaction
sloth_service: home-wifi
sloth_slo: good-wifi-client-satisfaction
sloth_window: 30d
- name: sloth-slo-meta-recordings-home-wifi-good-wifi-client-satisfaction
rules:
- record: slo:objective:ratio
expr: vector(0.95)
labels:
cluster: valhalla
cmd: examplesgen.sh
component: ubiquiti
context: home
sloth_id: home-wifi-good-wifi-client-satisfaction
sloth_service: home-wifi
sloth_slo: good-wifi-client-satisfaction
- record: slo:error_budget:ratio
expr: vector(1-0.95)
labels:
cluster: valhalla
cmd: examplesgen.sh
component: ubiquiti
context: home
sloth_id: home-wifi-good-wifi-client-satisfaction
sloth_service: home-wifi
sloth_slo: good-wifi-client-satisfaction
- record: slo:time_period:days
expr: vector(30)
labels:
cluster: valhalla
cmd: examplesgen.sh
component: ubiquiti
context: home
sloth_id: home-wifi-good-wifi-client-satisfaction
sloth_service: home-wifi
sloth_slo: good-wifi-client-satisfaction
- record: slo:current_burn_rate:ratio
expr: |
slo:sli_error:ratio_rate5m{sloth_id="home-wifi-good-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="good-wifi-client-satisfaction"}
/ on(sloth_id, sloth_slo, sloth_service) group_left
slo:error_budget:ratio{sloth_id="home-wifi-good-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="good-wifi-client-satisfaction"}
labels:
cluster: valhalla
cmd: examplesgen.sh
component: ubiquiti
context: home
sloth_id: home-wifi-good-wifi-client-satisfaction
sloth_service: home-wifi
sloth_slo: good-wifi-client-satisfaction
- record: slo:period_burn_rate:ratio
expr: |
slo:sli_error:ratio_rate30d{sloth_id="home-wifi-good-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="good-wifi-client-satisfaction"}
/ on(sloth_id, sloth_slo, sloth_service) group_left
slo:error_budget:ratio{sloth_id="home-wifi-good-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="good-wifi-client-satisfaction"}
labels:
cluster: valhalla
cmd: examplesgen.sh
component: ubiquiti
context: home
sloth_id: home-wifi-good-wifi-client-satisfaction
sloth_service: home-wifi
sloth_slo: good-wifi-client-satisfaction
- record: slo:period_error_budget_remaining:ratio
expr: 1 - slo:period_burn_rate:ratio{sloth_id="home-wifi-good-wifi-client-satisfaction",
sloth_service="home-wifi", sloth_slo="good-wifi-client-satisfaction"}
labels:
cluster: valhalla
cmd: examplesgen.sh
component: ubiquiti
context: home
sloth_id: home-wifi-good-wifi-client-satisfaction
sloth_service: home-wifi
sloth_slo: good-wifi-client-satisfaction
- record: sloth_slo_info
expr: vector(1)
labels:
cluster: valhalla
cmd: examplesgen.sh
component: ubiquiti
context: home
sloth_id: home-wifi-good-wifi-client-satisfaction
sloth_mode: cli-gen-prom
sloth_objective: "95"
sloth_service: home-wifi
sloth_slo: good-wifi-client-satisfaction
sloth_spec: prometheus/v1
sloth_version: dev
- name: sloth-slo-alerts-home-wifi-good-wifi-client-satisfaction
rules:
- alert: GoodWifiClientSatisfaction
expr: |
(
max(slo:sli_error:ratio_rate5m{sloth_id="home-wifi-good-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="good-wifi-client-satisfaction"} > (14.4 * 0.05)) without (sloth_window)
and
max(slo:sli_error:ratio_rate1h{sloth_id="home-wifi-good-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="good-wifi-client-satisfaction"} > (14.4 * 0.05)) without (sloth_window)
)
or
(
max(slo:sli_error:ratio_rate30m{sloth_id="home-wifi-good-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="good-wifi-client-satisfaction"} > (6 * 0.05)) without (sloth_window)
and
max(slo:sli_error:ratio_rate6h{sloth_id="home-wifi-good-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="good-wifi-client-satisfaction"} > (6 * 0.05)) without (sloth_window)
)
labels:
severity: home
sloth_severity: page
annotations:
summary: '{{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn
rate is over expected.'
title: (page) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget
burn rate is too fast.
- alert: GoodWifiClientSatisfaction
expr: |
(
max(slo:sli_error:ratio_rate2h{sloth_id="home-wifi-good-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="good-wifi-client-satisfaction"} > (3 * 0.05)) without (sloth_window)
and
max(slo:sli_error:ratio_rate1d{sloth_id="home-wifi-good-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="good-wifi-client-satisfaction"} > (3 * 0.05)) without (sloth_window)
)
or
(
max(slo:sli_error:ratio_rate6h{sloth_id="home-wifi-good-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="good-wifi-client-satisfaction"} > (1 * 0.05)) without (sloth_window)
and
max(slo:sli_error:ratio_rate3d{sloth_id="home-wifi-good-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="good-wifi-client-satisfaction"} > (1 * 0.05)) without (sloth_window)
)
labels:
severity: warning
sloth_severity: ticket
annotations:
summary: '{{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn
rate is over expected.'
title: (ticket) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget
burn rate is too fast.
- name: sloth-slo-sli-recordings-home-wifi-risk-wifi-client-satisfaction
rules:
- record: slo:sli_error:ratio_rate5m
expr: |
(sum_over_time((count(unifipoller_client_satisfaction_ratio < 0.5))[5m:]) OR on() vector(0))
/
(sum_over_time((count(unifipoller_client_satisfaction_ratio))[5m:]))
labels:
cluster: valhalla
cmd: examplesgen.sh
component: ubiquiti
context: home
sloth_id: home-wifi-risk-wifi-client-satisfaction
sloth_service: home-wifi
sloth_slo: risk-wifi-client-satisfaction
sloth_window: 5m
- record: slo:sli_error:ratio_rate30m
expr: |
(sum_over_time((count(unifipoller_client_satisfaction_ratio < 0.5))[30m:]) OR on() vector(0))
/
(sum_over_time((count(unifipoller_client_satisfaction_ratio))[30m:]))
labels:
cluster: valhalla
cmd: examplesgen.sh
component: ubiquiti
context: home
sloth_id: home-wifi-risk-wifi-client-satisfaction
sloth_service: home-wifi
sloth_slo: risk-wifi-client-satisfaction
sloth_window: 30m
- record: slo:sli_error:ratio_rate1h
expr: |
(sum_over_time((count(unifipoller_client_satisfaction_ratio < 0.5))[1h:]) OR on() vector(0))
/
(sum_over_time((count(unifipoller_client_satisfaction_ratio))[1h:]))
labels:
cluster: valhalla
cmd: examplesgen.sh
component: ubiquiti
context: home
sloth_id: home-wifi-risk-wifi-client-satisfaction
sloth_service: home-wifi
sloth_slo: risk-wifi-client-satisfaction
sloth_window: 1h
- record: slo:sli_error:ratio_rate2h
expr: |
(sum_over_time((count(unifipoller_client_satisfaction_ratio < 0.5))[2h:]) OR on() vector(0))
/
(sum_over_time((count(unifipoller_client_satisfaction_ratio))[2h:]))
labels:
cluster: valhalla
cmd: examplesgen.sh
component: ubiquiti
context: home
sloth_id: home-wifi-risk-wifi-client-satisfaction
sloth_service: home-wifi
sloth_slo: risk-wifi-client-satisfaction
sloth_window: 2h
- record: slo:sli_error:ratio_rate6h
expr: |
(sum_over_time((count(unifipoller_client_satisfaction_ratio < 0.5))[6h:]) OR on() vector(0))
/
(sum_over_time((count(unifipoller_client_satisfaction_ratio))[6h:]))
labels:
cluster: valhalla
cmd: examplesgen.sh
component: ubiquiti
context: home
sloth_id: home-wifi-risk-wifi-client-satisfaction
sloth_service: home-wifi
sloth_slo: risk-wifi-client-satisfaction
sloth_window: 6h
- record: slo:sli_error:ratio_rate1d
expr: |
(sum_over_time((count(unifipoller_client_satisfaction_ratio < 0.5))[1d:]) OR on() vector(0))
/
(sum_over_time((count(unifipoller_client_satisfaction_ratio))[1d:]))
labels:
cluster: valhalla
cmd: examplesgen.sh
component: ubiquiti
context: home
sloth_id: home-wifi-risk-wifi-client-satisfaction
sloth_service: home-wifi
sloth_slo: risk-wifi-client-satisfaction
sloth_window: 1d
- record: slo:sli_error:ratio_rate3d
expr: |
(sum_over_time((count(unifipoller_client_satisfaction_ratio < 0.5))[3d:]) OR on() vector(0))
/
(sum_over_time((count(unifipoller_client_satisfaction_ratio))[3d:]))
labels:
cluster: valhalla
cmd: examplesgen.sh
component: ubiquiti
context: home
sloth_id: home-wifi-risk-wifi-client-satisfaction
sloth_service: home-wifi
sloth_slo: risk-wifi-client-satisfaction
sloth_window: 3d
- record: slo:sli_error:ratio_rate30d
expr: |
sum_over_time(slo:sli_error:ratio_rate5m{sloth_id="home-wifi-risk-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="risk-wifi-client-satisfaction"}[30d])
/ ignoring (sloth_window)
count_over_time(slo:sli_error:ratio_rate5m{sloth_id="home-wifi-risk-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="risk-wifi-client-satisfaction"}[30d])
labels:
cluster: valhalla
cmd: examplesgen.sh
component: ubiquiti
context: home
sloth_id: home-wifi-risk-wifi-client-satisfaction
sloth_service: home-wifi
sloth_slo: risk-wifi-client-satisfaction
sloth_window: 30d
- name: sloth-slo-meta-recordings-home-wifi-risk-wifi-client-satisfaction
rules:
- record: slo:objective:ratio
expr: vector(0.9990000000000001)
labels:
cluster: valhalla
cmd: examplesgen.sh
component: ubiquiti
context: home
sloth_id: home-wifi-risk-wifi-client-satisfaction
sloth_service: home-wifi
sloth_slo: risk-wifi-client-satisfaction
- record: slo:error_budget:ratio
expr: vector(1-0.9990000000000001)
labels:
cluster: valhalla
cmd: examplesgen.sh
component: ubiquiti
context: home
sloth_id: home-wifi-risk-wifi-client-satisfaction
sloth_service: home-wifi
sloth_slo: risk-wifi-client-satisfaction
- record: slo:time_period:days
expr: vector(30)
labels:
cluster: valhalla
cmd: examplesgen.sh
component: ubiquiti
context: home
sloth_id: home-wifi-risk-wifi-client-satisfaction
sloth_service: home-wifi
sloth_slo: risk-wifi-client-satisfaction
- record: slo:current_burn_rate:ratio
expr: |
slo:sli_error:ratio_rate5m{sloth_id="home-wifi-risk-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="risk-wifi-client-satisfaction"}
/ on(sloth_id, sloth_slo, sloth_service) group_left
slo:error_budget:ratio{sloth_id="home-wifi-risk-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="risk-wifi-client-satisfaction"}
labels:
cluster: valhalla
cmd: examplesgen.sh
component: ubiquiti
context: home
sloth_id: home-wifi-risk-wifi-client-satisfaction
sloth_service: home-wifi
sloth_slo: risk-wifi-client-satisfaction
- record: slo:period_burn_rate:ratio
expr: |
slo:sli_error:ratio_rate30d{sloth_id="home-wifi-risk-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="risk-wifi-client-satisfaction"}
/ on(sloth_id, sloth_slo, sloth_service) group_left
slo:error_budget:ratio{sloth_id="home-wifi-risk-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="risk-wifi-client-satisfaction"}
labels:
cluster: valhalla
cmd: examplesgen.sh
component: ubiquiti
context: home
sloth_id: home-wifi-risk-wifi-client-satisfaction
sloth_service: home-wifi
sloth_slo: risk-wifi-client-satisfaction
- record: slo:period_error_budget_remaining:ratio
expr: 1 - slo:period_burn_rate:ratio{sloth_id="home-wifi-risk-wifi-client-satisfaction",
sloth_service="home-wifi", sloth_slo="risk-wifi-client-satisfaction"}
labels:
cluster: valhalla
cmd: examplesgen.sh
component: ubiquiti
context: home
sloth_id: home-wifi-risk-wifi-client-satisfaction
sloth_service: home-wifi
sloth_slo: risk-wifi-client-satisfaction
- record: sloth_slo_info
expr: vector(1)
labels:
cluster: valhalla
cmd: examplesgen.sh
component: ubiquiti
context: home
sloth_id: home-wifi-risk-wifi-client-satisfaction
sloth_mode: cli-gen-prom
sloth_objective: "99.9"
sloth_service: home-wifi
sloth_slo: risk-wifi-client-satisfaction
sloth_spec: prometheus/v1
sloth_version: dev
- name: sloth-slo-alerts-home-wifi-risk-wifi-client-satisfaction
rules:
- alert: RiskWifiClientSatisfaction
expr: |
(
max(slo:sli_error:ratio_rate5m{sloth_id="home-wifi-risk-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="risk-wifi-client-satisfaction"} > (14.4 * 0.0009999999999999432)) without (sloth_window)
and
max(slo:sli_error:ratio_rate1h{sloth_id="home-wifi-risk-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="risk-wifi-client-satisfaction"} > (14.4 * 0.0009999999999999432)) without (sloth_window)
)
or
(
max(slo:sli_error:ratio_rate30m{sloth_id="home-wifi-risk-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="risk-wifi-client-satisfaction"} > (6 * 0.0009999999999999432)) without (sloth_window)
and
max(slo:sli_error:ratio_rate6h{sloth_id="home-wifi-risk-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="risk-wifi-client-satisfaction"} > (6 * 0.0009999999999999432)) without (sloth_window)
)
labels:
severity: home
sloth_severity: page
annotations:
summary: '{{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn
rate is over expected.'
title: (page) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget
burn rate is too fast.
- alert: RiskWifiClientSatisfaction
expr: |
(
max(slo:sli_error:ratio_rate2h{sloth_id="home-wifi-risk-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="risk-wifi-client-satisfaction"} > (3 * 0.0009999999999999432)) without (sloth_window)
and
max(slo:sli_error:ratio_rate1d{sloth_id="home-wifi-risk-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="risk-wifi-client-satisfaction"} > (3 * 0.0009999999999999432)) without (sloth_window)
)
or
(
max(slo:sli_error:ratio_rate6h{sloth_id="home-wifi-risk-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="risk-wifi-client-satisfaction"} > (1 * 0.0009999999999999432)) without (sloth_window)
and
max(slo:sli_error:ratio_rate3d{sloth_id="home-wifi-risk-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="risk-wifi-client-satisfaction"} > (1 * 0.0009999999999999432)) without (sloth_window)
)
labels:
severity: warning
sloth_severity: ticket
annotations:
summary: '{{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn
rate is over expected.'
title: (ticket) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget
burn rate is too fast.