Monitor ベースの SLO

概要

To build an SLO from new or existing Datadog monitors, create a monitor-based SLO. Using a monitor-based SLO, you can calculate the Service Level Indicator (SLI) by dividing the amount of time your system exhibits good behavior by the total time.

Time Slice SLOs are another way to create SLOs with a time-based SLI calculation. With Time Slice SLOs, you can create an uptime SLO without going through a monitor, so you don’t have to create and maintain both a monitor and an SLO.
monitor-based SLO example

前提条件

モニターベースの SLO を作成するには、既存の Datadog モニターが必要です。新しいモニターをセットアップするには、モニター作成ページにアクセスします。

Datadog のモニターベースの SLO は、以下のモニタータイプをサポートしています。

  • メトリクスモニターの種類 (メトリクス、インテグレーション、APM メトリクス、異常検知、予測値、外れ値)
  • Synthetic
  • サービス チェック

セットアップ

On the SLO status page, click + New SLO. Then, select By Monitor Uptime.

クエリの定義

検索ボックスで、モニターの名前を入力し始めます。一致するモニターのリストが表示されます。モニター名をクリックすると、そのモニターがソースリストに追加されます。

:

  • If you’re using a single multi alert monitor in an SLO, you can optionally select “Calculate on selected groups” and pick up to 20 groups.
  • If you’re adding multiple monitors to your SLO, group selection is not supported. You can add up to 20 monitors.

SLO ターゲットの設定

目標パーセンテージ、タイムウィンドウ*、オプションで警告レベルを選択します。

The target percentage specifies the portion of time the underlying monitor(s) of the SLO should not be in the ALERT state. The time window specifies the rolling period the SLO runs its calculation.

SLI の値に応じて、Datadog UI は SLO のステータスを異なる色で表示します。

  • SLI が目標値を超えている間は、UI に SLO のステータスが緑色で表示されます。
  • SLI が目標値を下回ると、UI に SLO のステータスが赤色で表示されます。
  • 警告レベルを含め、SLI が警告を下回り、目標レベルを上回った場合、UI に SLO のステータスが黄色で表示されます。

選択したタイムウィンドウによって、モニターベースの SLO に利用できる精度が変わります。

  • 7 日および 30 日のタイムウィンドウは、小数点以下 2 桁まで表示可能です。
  • 90 日のタイムウィンドウは、小数点以下 3 桁まで表示可能です。

SLO の詳細 UI では、7 日および 30 日のタイムウィンドウで構成された SLO については小数点以下 2 桁、90 日のタイムウィンドウで構成された SLO については小数点以下 3 桁が Datadog に表示されます。

次の例は、Datadog が SLO 計算の小数点以下の桁数を制限して表示する理由を示しています。7 日または 30 日のタイムウィンドウで 99.999% の目標を設定すると、それぞれ 6 秒または 26 秒のエラーバジェットが発生します。モニターは 1 分ごとに評価するため、モニターベースの SLO の粒度も 1 分となります。したがって、1 つのアラートで、前の例の 6 秒または 26 秒のエラーバジェットが完全に消費され、過剰に使用されることになります。実際には、チームはこのような小さなエラーバジェットを満足させることはできません。

1 分間に 1 回のモニター評価よりも細かい粒度が必要な場合は、代わりにメトリクスベースの SLO を使用することを検討してください。

名前とタグを追加する

Choose a name and extended description for your SLO. Select any tags you would like to associate with your SLO. Select Create or Create & Set Alert to save your new SLO.

ステータス計算

Monitor-based SLO with groups

Datadog calculates the overall SLO status as the uptime percentage across all monitors or monitor groups, unless specific groups have been selected:

  • If specific groups have been selected (up to 20), the SLO status is calculated with only those groups. The UI displays all selected groups.
  • If no specific groups are selected, the SLO status is calculated across all groups. The UI displays all underlying groups of the SLO.

: グループがあるモニターベースの SLO では、最大 5,000 グループを含む SLO に対してすべてのグループを表示できます。5,000 を超えるグループを含む SLO の場合、SLO はすべてのグループに基づいて計算されますが、UI にはグループは表示されません。

モニターベースの SLO は、WARN 状態を OK として扱います。SLO の定義には、良い動作と悪い動作の二元的な区別が必要です。SLO の計算では、WARN は悪い動作を示すほど深刻ではないため、WARN を良い動作として扱います。

3 つのモニターを含むモニターベースの SLO の次の例を考えます。1 台のマルチアラートモニターに基づくモニターベースの SLO の計算も同様です。

モニターt1t2t3t4t5t6t7t8t9t10ステータス
モニター 1OKOKOKOKアラートOKOKOKOKOK90%
モニター 2OKOKOKOKOKOKOKOKアラートOK90%
モニター 3OKOKアラートOKアラートOKOKOKOKOK80%
全体的なステータスOKOKアラートOKアラートOKOKOKアラートOK70%

この例では、全体のステータスが個々のステータスの平均値よりも低くなっています。

Muting a monitor does not affect the SLO calculation. To exclude time periods from an SLO calculation, use the SLO status corrections feature.

Synthetic テストの例外

場合によっては、1 つのグループ化された Synthetic テストで構成されるモニターベースの SLO のステータス計算に例外があります。Synthetic テストには、テストが ALERT 状態に入るときの動作を変更し、その結果、全体的なアップタイムに影響を与えるオプションの特別なアラート条件があります。

  • グループが指定された分数の間失敗するまで待ちます (デフォルト: 0)
  • 指定された数のグループが失敗するまで待ちます (デフォルト: 1)
  • ロケーションのテストが失敗と見なされる前に、指定された回数再試行します (デフォルト: 0)

これらの条件のいずれかをデフォルト以外に変更した場合、1 つの Synthetic テストを使用するモニターベースの SLO の全体的なステータスは、Synthetic テストの個々のグループの集計ステータスよりも優れているように見える可能性があります。

Synthetic テストのアラート条件の詳細については、Synthetic モニタリングを参照してください。

欠損データ

Metric monitors

When you create a metric monitor, you choose how the monitor will handle missing data. This configuration affects how a monitor-based SLO calculation interprets missing data:

Monitor configurationSLO calculation of missing data
Evaluate as zeroDepends on the monitor alert threshold
For instance, a threshold of > 10 would result in Uptime (since the Monitor status would be OK), while a threshold of < 10 would result in Downtime.
Show last known statusKeep last state of SLO
Show NO DATAUptime
Show NO DATA and notifyDowntime
Show OKUptime

Other monitor types

When you create a service check monitor, you choose whether it sends an alert when data is missing. This configuration affects how a monitor-based SLO calculation interprets missing data. For monitors configured to ignore missing data, time periods with missing data are treated as OK (uptime) by the SLO. For monitors configured to alert on missing data, time periods with missing data are treated as ALERT (downtime) by the SLO.

Synthetic テストを一時停止すると、SLO はデータが欠落している期間を計算から除外します。UI では、これらの期間は SLO ステータスバーで薄いグレーで表示されます。

参考資料