DevOps & SRE(信頼性エンジニアリング)

SLO&エラーバジェット・マルチウィンドウ・バーンレート計算機

Google SRE に準拠した SLO アラート計算機。許容ダウンタイムとエラーバジェットの枯渇速度をモデル化し、Prometheus Alertmanager YAML と Grafana PromQL を即座に出力。

SLO Parameters

99.9%

~1296.0M total requests in 30 days

0.25%
0% (Perfect)2.5%5.0% (Severe)
Error Budget
0.100%
1,295,999 allowed bad requests
Max Downtime
0h 43m 11s
Total allowed outage in 30d
Burn Rate
2.5x
Exhausts budget in 11d 23h

Google SRE Multi-Window Multi-Burn-Rate Matrix

Eliminates alert fatigue by requiring both short and long rolling windows to exceed the burn rate threshold.

Target: 99.9%
Alert SeverityBurn MultiplierLong WindowShort WindowBudget Impact
Critical (Page)14.4x1h5m2% budget in 1 hour
High (Page)6x6h30m5% budget in 6 hours
Medium (Ticket)3x1d2h10% budget in 3 days
Low (Log)1x3d6h10% budget in 3 days
groups:
  - name: checkout-api-slo-burn-rate-alerts
    rules:
      # Critical Page (Fast Burn) (2% budget in 1 hour)
      - alert: checkout_api_SLOBurnRate_14_4x
        expr: |
          (
            rate(http_requests_total{status=~"5.."}[1h])
            /
            rate(http_requests_total[1h])
          ) > (14.4 * 0.00100)
          and
          (
            rate(http_requests_total{status=~"5.."}[5m])
            /
            rate(http_requests_total[5m])
          ) > (14.4 * 0.00100)
        for: 2m
        labels:
          severity: critical
          slo_target: "99.9%"
          service: "checkout-api"
        annotations:
          summary: "High error budget burn rate (14.4x) for checkout-api"
          description: "Service checkout-api is burning its 30-day error budget at 14.4x (threshold: >0.01440). Consuming 2% budget in 1 hour."

      # High Severity Page (Moderate Burn) (5% budget in 6 hours)
      - alert: checkout_api_SLOBurnRate_6x
        expr: |
          (
            rate(http_requests_total{status=~"5.."}[6h])
            /
            rate(http_requests_total[6h])
          ) > (6 * 0.00100)
          and
          (
            rate(http_requests_total{status=~"5.."}[30m])
            /
            rate(http_requests_total[30m])
          ) > (6 * 0.00100)
        for: 2m
        labels:
          severity: critical
          slo_target: "99.9%"
          service: "checkout-api"
        annotations:
          summary: "High error budget burn rate (6x) for checkout-api"
          description: "Service checkout-api is burning its 30-day error budget at 6x (threshold: >0.00600). Consuming 5% budget in 6 hours."

      # Medium Ticket (Slow Burn) (10% budget in 3 days)
      - alert: checkout_api_SLOBurnRate_3x
        expr: |
          (
            rate(http_requests_total{status=~"5.."}[1d])
            /
            rate(http_requests_total[1d])
          ) > (3 * 0.00100)
          and
          (
            rate(http_requests_total{status=~"5.."}[2h])
            /
            rate(http_requests_total[2h])
          ) > (3 * 0.00100)
        for: 2m
        labels:
          severity: warning
          slo_target: "99.9%"
          service: "checkout-api"
        annotations:
          summary: "High error budget burn rate (3x) for checkout-api"
          description: "Service checkout-api is burning its 30-day error budget at 3x (threshold: >0.00300). Consuming 10% budget in 3 days."

      # Low Warning (Drift) (10% budget in 3 days)
      - alert: checkout_api_SLOBurnRate_1x
        expr: |
          (
            rate(http_requests_total{status=~"5.."}[3d])
            /
            rate(http_requests_total[3d])
          ) > (1 * 0.00100)
          and
          (
            rate(http_requests_total{status=~"5.."}[6h])
            /
            rate(http_requests_total[6h])
          ) > (1 * 0.00100)
        for: 2m
        labels:
          severity: warning
          slo_target: "99.9%"
          service: "checkout-api"
        annotations:
          summary: "High error budget burn rate (1x) for checkout-api"
          description: "Service checkout-api is burning its 30-day error budget at 1x (threshold: >0.00100). Consuming 10% budget in 3 days."

Why Single-Window Burn Rate Alerts Fail in Production

Traditional alerts check a single rolling window (e.g. 5 minutes). If a brief traffic spike causes 50 errors in 1 minute, a 5-minute alert fires and wakes up the engineer, even if the system has already recovered. Conversely, a 30-day alert takes days to notice a severe 5% regression.

Google SRE’s Multi-Window Multi-Burn-Rate methodology requires that both a short window (e.g. 5 minutes) and a long window (e.g. 1 hour) simultaneously breach the burn rate threshold. This guarantees near-zero alert reset latency while completely eliminating false positives from ephemeral network blips.

使い方

  1. ステップ 1: 目標とするサービスレベル目標(SLO、例: 99.9% や 99.95%)と評価期間(例: 30日間)を選択します。
  2. ステップ 2: 平均トラフィック(RPS)を入力し、許容される最大エラーリクエスト数を計算します。
  3. ステップ 3: 現在の障害エラー率をシミュレートし、バーンレート倍率とバジェット枯渇までの残り時間を確認します。
  4. ステップ 4: 生成された Prometheus Alertmanager YAML または Grafana PromQL クエリを監視システムにコピーします。

よくある質問

マルチウィンドウ・マルチバーンレートアラートとは何ですか?
Google SRE が提唱する SLO 監視の業界標準です。長いウィンドウ(例: 1時間)と短いウィンドウ(例: 5分)を同時に評価することで、一時的なスパイクによるアラート疲れを防ぎながら、重大障害には数分で迅速に通知します。
バーンレート倍率はどのように計算されますか?
バーンレートは、現在観測されているエラー率と許容される最大エラー率の比率です。SLO 99.9% の場合、許容エラー率は 0.1% です。1.44% のエラー率が発生している場合、バーンレートは 1.44 / 0.1 = 14.4倍となり、1時間で月間バジェットの2%を消費します。
99.9% と 99.99% で許容されるダウンタイムの違いは何ですか?
30日間の期間において、99.9% SLO では合計43分12秒のダウンタイムが許容されますが、99.99%(フォーナイン)では月全体でわずか4分19秒しか許容されません。
CPU使用率やエラー件数ではなくバーンレートでアラートを設定すべき理由は何ですか?
固定しきい値(例: "エラー数 > 100")は、高トラフィック時に成功率99.99%でも誤発報し、夜間の低トラフィック時には全ユーザーが失敗していても検知できません。SLO バーンレートはユーザーへの実質的な影響度を直接測定します。

The Senior Full-Stack Production Kit (2026)

Checklists, Docker recipes, and SSR error fixes in one dense PDF.

Get Free Kit

関連ディープダイブ