File: rules.yml

package info (click to toggle)
prometheus 2.53.5%2Bds1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 25,452 kB
  • sloc: javascript: 2,423; yacc: 758; sh: 431; makefile: 231; lex: 189
file content (28 lines) | stat: -rw-r--r-- 771 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# This is the rules file.

groups:
  - name: alerts
    rules:
      - alert: InstanceDown
        expr: up == 0
        for: 5m
        labels:
          severity: page
        annotations:
          summary: "Instance {{ $labels.instance }} 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:])