# INTENTIONALLY INVALID rule file. Every group below breaks a different
# promtool check, and the comments say which.
groups:
  # 1. `alert` and `record` are mutually exclusive in one rule.
  - name: both-alert-and-record
    rules:
      - alert: Confused
        record: also_confused
        expr: up == 0

  # 2. PromQL syntax error: an aggregation with no grouping parentheses.
  - name: bad-promql
    rules:
      - alert: BadExpression
        expr: sum by service (rate(http_requests_total[5m])) > 1
        for: 5m

  # 3. Duplicate group name (see group 1's sibling below) and a missing expr.
  - name: bad-promql
    rules:
      - alert: NoExpression
        for: 5m
        labels:
          severity: page

  # 4. `for` must be a duration, and severity must be a string not a bare word list.
  - name: bad-types
    rules:
      - alert: BadDuration
        expr: up == 0
        for: five minutes
        labels:
          severity: [critical, page]
