mirror of https://github.com/prometheus/prometheus
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
1.8 KiB
65 lines
1.8 KiB
8 years ago
|
groups:
|
||
4 years ago
|
- 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 }}"
|
||
8 years ago
|
|
||
4 years ago
|
# 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
|
||
8 years ago
|
|
||
4 years ago
|
- 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 }}"
|
||
8 years ago
|
|
||
4 years ago
|
- 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
|
||
8 years ago
|
|
||
4 years ago
|
- 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 }}"
|