mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-24 05:04:05 -08:00
5d233df7ef
Signed-off-by: DrAuYueng <ouyang1204@gmail.com>
29 lines
765 B
YAML
29 lines
765 B
YAML
# This is the rules file.
|
|
|
|
groups:
|
|
- name: alerts
|
|
rules:
|
|
- alert: InstanceDown
|
|
expr: up == 0
|
|
for: 5m
|
|
labels:
|
|
severity: page
|
|
annotations:
|
|
summary: "Instance {{ $label.foo }} down"
|
|
description: "{{ $labels.instance }} of job {{ $labels.job }} has been down for more than 5 minutes."
|
|
- alert: AlwaysFiring
|
|
expr: 1
|
|
|
|
- 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
|
|
|
|
# Subquery with default resolution test.
|
|
- record: suquery_interval_test
|
|
expr: count_over_time(up[5m:])
|