mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-11 16:14:05 -08:00
60 lines
1.6 KiB
YAML
60 lines
1.6 KiB
YAML
|
version: 1
|
||
|
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-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
|
||
|
|
||
|
- 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 }}"
|