Skip to content
Snippets Groups Projects
Verified Commit 705810d8 authored by Sheogorath's avatar Sheogorath :european_castle:
Browse files

feat(blog): Add SLO for blog

parent 195de762
No related branches found
No related tags found
No related merge requests found
...@@ -6,6 +6,7 @@ resources: ...@@ -6,6 +6,7 @@ resources:
- certificate.yaml - certificate.yaml
- blog.yaml - blog.yaml
- ingress.yaml - ingress.yaml
- slo.yaml
- ../../../shared/networkpolicies/allow-from-ingress.yaml - ../../../shared/networkpolicies/allow-from-ingress.yaml
- ../../../shared/resourcequotas/default.yaml - ../../../shared/resourcequotas/default.yaml
patchesStrategicMerge: patchesStrategicMerge:
......
apiVersion: sloth.slok.dev/v1
kind: PrometheusServiceLevel
metadata:
name: requests-blog
namespace: mastblogodon
spec:
service: "blog"
slos:
- name: "requests-availability"
objective: 99
description: "blog SLO based on availability for HTTP request responses."
sli:
events:
errorQuery: sum(rate(nginx_ingress_controller_requests{exported_namespace="blog",ingress="blog",status=~"(5..|429)"}[{{.window}}]))
totalQuery: sum(rate(nginx_ingress_controller_requests{exported_namespace="blog",ingress="blog"}[{{.window}}]))
alerting:
name: blogHighErrorRate
labels:
category: "availability"
annotations:
summary: "High error rate on 'blog' requests responses"
- name: "requests-latency"
objective: 99
description: "Warn that we apiserver responses are being slow and this will affect the clients (kubectl users, controllers...)."
labels:
category: latency
sli:
events:
error_query: |
(
sum(rate(nginx_ingress_controller_request_duration_seconds_count{exported_namespace="blog",ingress="blog",method!="WATCH"}[{{.window}}]))
-
sum(rate(nginx_ingress_controller_request_duration_seconds_bucket{exported_namespace="blog",ingress="blog",le="0.25",verb!="WATCH"}[{{.window}}]))
)
total_query: sum(rate(nginx_ingress_controller_request_duration_seconds_count{exported_namespace="blog",ingress="blog",method!="WATCH"}[{{.window}}]))
alerting:
name: blogLatencyAlert
labels:
category: "latency"
annotations:
summary: "Slow responses on 'blog' requests responses. More than 1% take more than 250ms."
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment