-
Notifications
You must be signed in to change notification settings - Fork 0
/
alerts.yml
41 lines (41 loc) · 1.78 KB
/
alerts.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
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: su-pdfgen
namespace: supstonad
labels:
team: supstonad
spec:
groups:
- name: su-pdfgen
rules:
- alert: su-pdfgen-metrics-scrape-feilet
expr: sum(up{app="su-pdfgen", job="kubernetes-pods"}) < 1
for: 1m
annotations:
consequence: "su-pdfgen sitt /metrics endepunktet har vært utilgjengelig i minst 1 minutt"
action: "`kubectl describe pod {{ $labels.kubernetes_pod_name }}` for events, og `kubectl logs {{ $labels.kubernetes_pod_name }}` for logger"
labels:
namespace: supstonad
severity: critical
- alert: su-pdfgen-error-logg
expr: 'sum(max_over_time(log_messages_errors{namespace="supstonad",app="su-pdfgen",level="Error"}[15m])
or vector(0)) -
sum(max_over_time(log_messages_errors{namespace="supstonad",app="su-pdfgen",level="Error"}[15m]
offset 15m) or vector(0)) > 0'
for: 1s
annotations:
consequence: "su-pdfgen har fått en ny error i loggen siste 15 min"
action: "Det er logget en melding i Kibana. Sjekk logger her: `{{LOGS_URL}}`"
labels:
namespace: supstonad
severity: critical
- alert: su-pdfgen-pods-available
expr: sum(kube_deployment_status_replicas_available{deployment="su-pdfgen"}) < 1
for: 1m
annotations:
consequence: "Tilgjengelige kubernetes pods for su-pdfgen er mindre enn 1"
action: "`kubectl describe pod {{ $labels.kubernetes_pod_name }}` for events, og `kubectl logs {{ $labels.kubernetes_pod_name }}` for logger"
labels:
namespace: supstonad
severity: critical