prometheus/model/rulefmt/testdata/test.yaml
beorn7 c954cd9d1d Move packages out of deprecated pkg directory
This creates a new `model` directory and moves all data-model related
packages over there:
  exemplar labels relabel rulefmt textparse timestamp value

All the others are more or less utilities and have been moved to `util`:
  gate logging modetimevfs pool runtime

Signed-off-by: beorn7 <beorn@grafana.com>
2021-11-09 08:03:10 +01:00

65 lines
1.8 KiB
YAML

groups:
- name: my-group-name
interval: 30s # defaults to global interval
rules:
- alert: HighErrors
expr: |
sum without(instance) (rate(errors_total[5m]))
/
sum without(instance) (rate(requests_total[5m]))
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]))
/
sum without(instance) (rate(requests_total[5m]))
labels:
abc: edf
uvw: xyz
- alert: HighErrors
expr: |
sum without(instance) (rate(errors_total[5m]))
/
sum without(instance) (rate(requests_total[5m]))
for: 5m
labels:
severity: critical
annotations:
description: "stuff's happening with {{ $.labels.service }}"
- name: my-another-name
interval: 30s # defaults to global interval
rules:
- alert: HighErrors
expr: |
sum without(instance) (rate(errors_total[5m]))
/
sum without(instance) (rate(requests_total[5m]))
for: 5m
labels:
severity: critical
- record: "new_metric"
expr: |
sum without(instance) (rate(errors_total[5m]))
/
sum without(instance) (rate(requests_total[5m]))
- alert: HighErrors
expr: |
sum without(instance) (rate(errors_total[5m]))
/
sum without(instance) (rate(requests_total[5m]))
for: 5m
labels:
severity: critical
annotations:
description: "stuff's happening with {{ $.labels.service }}"