2023-10-13 11:54:33 +00:00
|
|
|
groups:
|
|
|
|
- name: group1
|
|
|
|
rules:
|
|
|
|
- alert: InstanceDown
|
|
|
|
expr: up == 0
|
|
|
|
for: 5m
|
|
|
|
labels:
|
|
|
|
severity: page
|
|
|
|
annotations:
|
|
|
|
summary: "Instance {{ $labels.instance }} down"
|
2024-08-19 19:29:28 +00:00
|
|
|
description: "{{ $labels.instance }} of job {{ $labels.job }} in cluster {{ $externalLabels.cluster }} has been down for more than 5 minutes."
|
|
|
|
dashboard: '{{ $externalURL }}/d/dashboard?orgId=1'
|
2023-10-13 11:54:33 +00:00
|
|
|
- alert: AlwaysFiring
|
|
|
|
expr: 1
|
|
|
|
- alert: SameAlertNameWithDifferentGroup
|
|
|
|
expr: absent(test)
|
|
|
|
for: 1m
|
|
|
|
|
|
|
|
- name: group2
|
|
|
|
rules:
|
|
|
|
- record: t1
|
|
|
|
expr: test
|
|
|
|
- record: job:test:count_over_time1m
|
|
|
|
expr: sum without(instance) (count_over_time(test[1m]))
|
|
|
|
- record: suquery_interval_test
|
|
|
|
expr: count_over_time(up[5m:])
|
|
|
|
|
|
|
|
- alert: SameAlertNameWithDifferentGroup
|
|
|
|
expr: absent(test)
|
|
|
|
for: 5m
|
|
|
|
|
|
|
|
- name: group3
|
|
|
|
rules:
|
|
|
|
- record: t2
|
|
|
|
expr: t1
|
|
|
|
|
|
|
|
- name: group4
|
|
|
|
rules:
|
|
|
|
- record: t3
|
|
|
|
expr: t1
|
2024-06-18 12:00:06 +00:00
|
|
|
|
|
|
|
- name: emptyGroup
|
|
|
|
rules: []
|