-
Notifications
You must be signed in to change notification settings - Fork 1
/
alerts.yml
53 lines (53 loc) · 2.41 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
42
43
44
45
46
47
48
49
50
51
52
53
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: su-se-bakover
namespace: supstonad
labels:
team: supstonad
spec:
groups:
- name: su-se-bakover
rules:
- alert: su-se-bakover-metrics-scrape-feilet
expr: sum(up{app="su-se-bakover", job="kubernetes-pods"}) < 1
for: 1m
annotations:
consequence: "su-se-bakover 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-se-bakover-error-logg
expr: 'sum(max_over_time(log_messages_errors{namespace="supstonad",app="su-se-bakover",level="Error"}[15m])
or vector(0)) -
sum(max_over_time(log_messages_errors{namespace="supstonad",app="su-se-bakover",level="Error"}[15m]
offset 15m) or vector(0)) > 0'
for: 1s
annotations:
consequence: "su-se-bakover 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-datapakke-soknad-error-logg
expr: 'sum(max_over_time(log_messages_errors{namespace="supstonad",app="su-datapakke-soknad",level="Error"}[15m])
or vector(0)) -
sum(max_over_time(log_messages_errors{namespace="supstonad",app="su-datapakke-soknad",level="Error"}[15m]
offset 15m) or vector(0)) > 0'
for: 1s
annotations:
consequence: "su-datapakke-soknad 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-se-bakover-pods-available
expr: sum(kube_deployment_status_replicas_available{deployment="su-se-bakover"}) < 1
for: 1m
annotations:
consequence: "Tilgjengelige kubernetes pods for su-se-bakover 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