groups:
  - name: portfolio-alerts
    rules:
      - alert: PortfolioTargetDown
        expr: portfolio_target_up == 0
        for: 2m
        labels: {severity: critical, team: portfolio}
        annotations:
          summary: "{{ $labels.project }} is unavailable"
          description: "Synthetic monitoring reports the target down for more than two minutes."
          runbook_url: "https://github-website-ed8.pages.dev/docs/incident-runbook.md"
      - alert: PortfolioLatencyHigh
        expr: portfolio_probe_latency_ms > 2000
        for: 5m
        labels: {severity: warning, team: portfolio}
        annotations:
          summary: "High latency for {{ $labels.project }}"
          description: "The latest probe latency is above 2000 ms."
      - alert: PortfolioSlaBurn
        expr: portfolio_target_uptime_ratio_30d < 0.999
        for: 15m
        labels: {severity: critical, team: portfolio}
        annotations:
          summary: "SLA budget at risk for {{ $labels.project }}"
          description: "Thirty-day availability is below the 99.9 percent objective."
