Move rules to dedicated file
This commit is contained in:
parent
4392302eb4
commit
00caae0ed3
@ -161,19 +161,7 @@ in {
|
|||||||
} ];
|
} ];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
rules = [ ''
|
rules = [ (readFile ./rules.yml) ];
|
||||||
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."
|
|
||||||
'' ];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services.grafana = {
|
services.grafana = {
|
||||||
|
11
hosts/monitoring-3/rules.yml
Normal file
11
hosts/monitoring-3/rules.yml
Normal 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."
|
Loading…
Reference in New Issue
Block a user