Scope metric-based SLO queries
이 페이지는 아직 영어로 제공되지 않습니다. 번역 작업 중입니다.
현재 번역 프로젝트에 대한 질문이나 피드백이 있으신 경우
언제든지 연락주시기 바랍니다.This feature is only available for metric-based SLO queries.
Overview
The SLO widget supports advanced metric query filtering, including the use of template variables to dynamically scope results displayed.
Walk through of an SLO query
Metric-based SLO query
First, create a metric-based SLO. This example uses APM trace metrics to measure the availability of an example service called web-store.
Good events (numerator)
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()
Total events (denominator)
sum:trace.rack.request.hits{service:web-store} by {resource_name}.as_count()
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.
With this configuration, what happens when the Dashboard template variable is changed to env:prod and availability-zone:northcentralus?
The SLO widget filters the SLO metric queries by those additional tags for your visualization purposes:
Good events (numerator)
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()
Total events (denominator)
sum:trace.rack.request.hits{service:web-store, env:prod, availability-zone:northcentralus} by {resource_name}.as_count()
Further reading