forked from grafana/jsonnet-libs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalerts.libsonnet
53 lines (53 loc) · 1.71 KB
/
alerts.libsonnet
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
{
prometheusAlerts+: {
groups+: [
{
name: 'memcached',
rules: [
{
alert: 'MemcachedDown',
expr: |||
memcached_up == 0
|||,
'for': '15m',
labels: {
severity: 'critical',
},
annotations: {
description: 'Memcached instance {{ $labels.job }} / {{ $labels.instance }} is down for more than 15 minutes.',
summary: 'Memcached instance is down.',
},
},
{
alert: 'MemcachedConnectionLimitApproaching',
expr: |||
(memcached_current_connections / memcached_max_connections * 100) > 80
|||,
'for': '15m',
labels: {
severity: 'warning',
},
annotations: {
description: 'Memcached instance {{ $labels.job }} / {{ $labels.instance }} connection usage is at {{ printf "%0.0f" $value }}% for at least 15 minutes.',
summary: 'Memcached max connection limit is approaching.',
},
},
{
alert: 'MemcachedConnectionLimitApproaching',
expr: |||
(memcached_current_connections / memcached_max_connections * 100) > 95
|||,
'for': '15m',
labels: {
severity: 'critical',
},
annotations: {
description: 'Memcached instance {{ $labels.job }} / {{ $labels.instance }} connection usage is at {{ printf "%0.0f" $value }}% for at least 15 minutes.',
summary: 'Memcached connections at critical level.',
},
},
],
},
],
},
}