メトリクスベースの SLO クエリをスコープする

この機能は、メトリクスベースの SLO クエリでのみ使用できます。

概要

The SLO widget supports advanced metric query filtering, including the use of template variables to dynamically scope results displayed.

SLO クエリの説明

メトリクスベース SLO クエリ

まず、メトリクスベースの SLO を作成します。この例では、APM のトレースメトリクスを使用して、web-store という例のサービスの可用性を測定しています。

良好イベント (分子)

sum:trace.rack.request.hits{service:web-store} by {resource_name}.as_count()
sum:trace.rack.request.errors{service:web-store} by {resource_name}.as_count()

総イベント (分母)

sum:trace.rack.request.hits{service:web-store} by {resource_name}.as_count()

SLO configuration showing example trace metrics

SLO widget

Select the SLO in the SLO widget editor. You can apply additional filters in the widget configuration to further scope the results displayed. This does not modify the original definition of the SLO. In the example, we add the $env and $availability-zone tags to the filter by field of the widget.

SLO Summary editor with dynamic tags for $env and $availability-zone

この構成で、Dashboard テンプレート変数env:prodavailability-zone:northcentralus に変更するとどうなりますか?

The SLO widget filters the SLO metric queries by those additional tags for your visualization purposes:

良好イベント (分子)

sum:trace.rack.request.hits{service:web-store, env:prod, availability-zone:northcentralus} by {resource_name}.as_count()
sum:trace.rack.request.errors{service:web-store, env:prod, availability-zone:northcentralus} by {resource_name}.as_count()

総イベント (分母)

sum:trace.rack.request.hits{service:web-store, env:prod, availability-zone:northcentralus} by {resource_name}.as_count()

参考資料

お役に立つドキュメント、リンクや記事:

PREVIEWING: bartol/timeshift-docs