2017-06-07 07:58:15 -07:00
|
|
|
groups:
|
|
|
|
- name: my-group-name
|
|
|
|
interval: 30s # defaults to global interval
|
|
|
|
rules:
|
|
|
|
- alert: HighErrors
|
|
|
|
expr: |
|
|
|
|
sum without(instance) (rate(errors_total[5m]))
|
2017-06-14 02:37:54 -07:00
|
|
|
/
|
|
|
|
sum without(instance) (rate(requests_total[5m]))
|
2017-06-07 07:58:15 -07:00
|
|
|
for: 5m
|
|
|
|
labels:
|
|
|
|
severity: critical
|
|
|
|
annotations:
|
|
|
|
description: "stuff's happening with {{ $.labels.service }}"
|
|
|
|
|
|
|
|
# Mix recording rules in the same list
|
|
|
|
- record: "new_metric"
|
|
|
|
expr: |
|
|
|
|
sum without(instance) (rate(errors_total[5m]))
|
2017-06-14 02:37:54 -07:00
|
|
|
/
|
|
|
|
sum without(instance) (rate(requests_total[5m]))
|
2017-06-07 07:58:15 -07:00
|
|
|
labels:
|
|
|
|
abc: edf
|
|
|
|
uvw: xyz
|
|
|
|
|
|
|
|
- alert: HighErrors
|
|
|
|
expr: |
|
|
|
|
sum without(instance) (rate(errors_total[5m]))
|
2017-06-14 02:37:54 -07:00
|
|
|
/
|
|
|
|
sum without(instance) (rate(requests_total[5m]))
|
2017-06-07 07:58:15 -07:00
|
|
|
for: 5m
|
|
|
|
labels:
|
|
|
|
severity: critical
|
|
|
|
annotations:
|
|
|
|
description: "stuff's happening with {{ $.labels.service }}"
|
|
|
|
|
2017-06-14 00:51:32 -07:00
|
|
|
- name: my-another-name
|
2017-06-07 07:58:15 -07:00
|
|
|
interval: 30s # defaults to global interval
|
|
|
|
rules:
|
|
|
|
- alert: HighErrors
|
|
|
|
expr: |
|
|
|
|
sum without(instance) (rate(errors_total[5m]))
|
2017-06-14 02:37:54 -07:00
|
|
|
/
|
|
|
|
sum without(instance) (rate(requests_total[5m]))
|
2017-06-07 07:58:15 -07:00
|
|
|
for: 5m
|
|
|
|
labels:
|
|
|
|
severity: critical
|
|
|
|
|
|
|
|
- record: "new_metric"
|
|
|
|
expr: |
|
|
|
|
sum without(instance) (rate(errors_total[5m]))
|
2017-06-14 02:37:54 -07:00
|
|
|
/
|
|
|
|
sum without(instance) (rate(requests_total[5m]))
|
2017-06-07 07:58:15 -07:00
|
|
|
|
|
|
|
- alert: HighErrors
|
|
|
|
expr: |
|
|
|
|
sum without(instance) (rate(errors_total[5m]))
|
2017-06-14 02:37:54 -07:00
|
|
|
/
|
|
|
|
sum without(instance) (rate(requests_total[5m]))
|
2017-06-07 07:58:15 -07:00
|
|
|
for: 5m
|
|
|
|
labels:
|
|
|
|
severity: critical
|
|
|
|
annotations:
|
|
|
|
description: "stuff's happening with {{ $.labels.service }}"
|