-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathprometheusrule.yaml
More file actions
70 lines (67 loc) · 2.59 KB
/
prometheusrule.yaml
File metadata and controls
70 lines (67 loc) · 2.59 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
---
# yaml-language-server: $schema=https://kube-schemas.pages.dev/monitoring.coreos.com/prometheusrule_v1.json
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: smokeping-prober-rules
namespace: monitoring
spec:
groups:
- name: smokeping-prober.rules
rules:
- alert: SmokepingProberDown
annotations:
description: Smokeping Prober has disappeared from Prometheus target discovery.
summary: Smokeping Prober is down.
expr: |
absent(up{job=~".*smokeping-prober.*"} == 1)
for: 15m
labels:
severity: critical
- alert: SmokepingHighLatency
annotations:
description: 'Network latency to {{ $labels.host }} is averaging {{ printf "%.2f" $value | humanize }}ms over the last 5 minutes.'
summary: High network latency detected to {{ $labels.host }}.
expr: |
(
rate(smokeping_response_duration_seconds_sum{job=~".*smokeping-prober.*"}[5m])
/
rate(smokeping_response_duration_seconds_count{job=~".*smokeping-prober.*"}[5m])
) * 1000 > 50
for: 5m
labels:
severity: warning
- alert: SmokepingPacketLoss
annotations:
description: 'Packet loss to {{ $labels.host }} is {{ printf "%.2f" $value | humanizePercentage }} over the last 5 minutes.'
summary: Packet loss detected to {{ $labels.host }}.
expr: |
(
(
rate(smokeping_requests_total{job=~".*smokeping-prober.*"}[5m])
-
rate(smokeping_response_duration_seconds_count{job=~".*smokeping-prober.*"}[5m])
)
/
rate(smokeping_requests_total{job=~".*smokeping-prober.*"}[5m])
) > 0.05
for: 5m
labels:
severity: warning
- alert: SmokepingTargetDown
annotations:
description: 'Target {{ $labels.host }} is not responding to pings. Packet loss is 100% over the last 5 minutes.'
summary: Target {{ $labels.host }} is completely unreachable.
expr: |
(
(
rate(smokeping_requests_total{job=~".*smokeping-prober.*"}[5m])
-
rate(smokeping_response_duration_seconds_count{job=~".*smokeping-prober.*"}[5m])
)
/
rate(smokeping_requests_total{job=~".*smokeping-prober.*"}[5m])
) >= 1
for: 5m
labels:
severity: critical