2020-06-15 15:03:07 +00:00
|
|
|
# This is the rules file.
|
|
|
|
|
|
|
|
groups:
|
2020-10-24 11:03:55 +00:00
|
|
|
- name: alerts
|
2020-06-15 15:03:07 +00:00
|
|
|
rules:
|
|
|
|
- alert: InstanceDown
|
|
|
|
expr: up == 0
|
|
|
|
for: 5m
|
|
|
|
labels:
|
|
|
|
severity: page
|
|
|
|
annotations:
|
|
|
|
summary: "Instance {{ $labels.instance }} down"
|
|
|
|
description: "{{ $labels.instance }} of job {{ $labels.job }} has been down for more than 5 minutes."
|
2020-10-24 11:03:55 +00:00
|
|
|
|
|
|
|
- name: rules
|
|
|
|
rules:
|
|
|
|
- record: job:test:count_over_time1m
|
|
|
|
expr: sum without(instance) (count_over_time(test[1m]))
|
|
|
|
|
|
|
|
# A recording rule that doesn't depend on input series.
|
|
|
|
- record: fixed_data
|
|
|
|
expr: 1
|