Skip to content

Commit ee275b1

Browse files
authored
Add alert from the cortex mixin. (#275)
* Add alert from the cortex mixin. Signed-off-by: Tom Wilkie <[email protected]> * lint Signed-off-by: Tom Wilkie <[email protected]>
1 parent bcc5771 commit ee275b1

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

memcached-mixin/alerts.libsonnet

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
prometheusAlerts+: {
3+
groups+: [
4+
{
5+
name: 'memcached',
6+
rules: [
7+
{
8+
alert: 'MemcachedDown',
9+
expr: |||
10+
memcached_up == 0
11+
|||,
12+
'for': '15m',
13+
labels: {
14+
severity: 'critical',
15+
},
16+
annotations: {
17+
message: |||
18+
Memcached Instance {{ $labels.job }} / {{ $labels.instance }} is down for more than 15mins.
19+
|||,
20+
},
21+
},
22+
],
23+
},
24+
],
25+
},
26+
}

memcached-mixin/mixin.libsonnet

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
(import 'dashboards.libsonnet') {
1+
(import 'dashboards.libsonnet') +
2+
(import 'alerts.libsonnet') +
3+
{
24
grafanaDashboardFolder: 'Memcached',
35
}

0 commit comments

Comments
 (0)