forked from slok/sloth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
raw-home-wifi.yml
41 lines (41 loc) · 1.54 KB
/
raw-home-wifi.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# This example shows another less accurate or simpler way of creating the home wifi SLO.
#
# The metrics already give us a metric in ratio for each wifi connection satisfaction, instead of getting
# good and bad events as connection with a minimum satisfaction ratio, we will calculate the averate of all
# ratio satisfaction connections over the time window.
# So we can't use the `events` SLI because we are not going to divide bad and total events.
#
# - `wifi-client-satisfaction`
# - This SLO warn us that we have an average wifi connection satisfaction.
# - SLI error: Calculated internally by ubiquitis metrics, we use directly the ratio.
# - SLO objective (95%): We allow the average wifi connection satisfaction is >=95%
#
# `sloth generate -i ./examples/raw-home-wifi.yml`
#
version: "prometheus/v1"
service: "home-wifi"
labels:
cluster: "valhalla"
component: "ubiquiti"
context: "home"
slos:
- name: "wifi-client-satisfaction"
objective: 95
description: "Warn us that we have an average wifi connection satisfaction."
sli:
raw:
# Get the averate satisfaction ratio and rest 1 (max good) to get the error ratio.
error_ratio_query: |
1 - (
sum(sum_over_time(unifipoller_client_satisfaction_ratio[{{.window}}]))
/
sum(count_over_time(unifipoller_client_satisfaction_ratio[{{.window}}]))
)
alerting:
name: WifiClientSatisfaction
page_alert:
labels:
severity: home
ticket_alert:
labels:
severity: warning