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