1
0

Move rules to dedicated file

This commit is contained in:
clerie 2021-10-22 23:53:42 +02:00
parent 4392302eb4
commit 00caae0ed3
2 changed files with 12 additions and 13 deletions

View File

@ -161,19 +161,7 @@ in {
} ];
}
];
rules = [ ''
groups:
- name: alert.rules
rules:
- alert: InstanceDown
expr: up == 0
for: 1m
labels:
severity: critical
annotations:
summary: "Endpoint {{ $labels.instance }} down"
description: "{{ $labels.instance }} of job {{ $labels.job }} has been down for more than 1 minutes."
'' ];
rules = [ (readFile ./rules.yml) ];
};
services.grafana = {

View File

@ -0,0 +1,11 @@
groups:
- name: alert.rules
rules:
- alert: InstanceDown
expr: up == 0
for: 1m
labels:
severity: critical
annotations:
summary: "Endpoint {{ $labels.instance }} down"
description: "{{ $labels.instance }} of job {{ $labels.job }} has been down for more than 1 minutes."