탑 리스트 위젯
탑 리스트 위젯 (Top List Widget)
출처: 문서
본문
탑 리스트(top list) 시각화를 사용하면 어떤 메트릭 또는 이벤트 값이 가장 많거나 적은 태그 값 목록을 표시할 수 있어요. 예를 들어 CPU를 가장 많이 소비하는 항목, 디스크 공간이 가장 적은 호스트, 비용이 가장 높은 클라우드 제품이에요.
설정 (Setup)
구성 (Configuration)
-
그래프로 그릴 데이터를 선택해요.
- 메트릭: 메트릭 쿼리를 구성하려면 쿼리 문서를 참고하세요.
- 비메트릭 데이터 소스: 이벤트 쿼리를 구성하려면 트레이스 검색 문서 또는 로그 검색 문서를 참고하세요.
-
선택 사항: 추가 그래프 표시 구성을 확인해요.
옵션 (Options)
그래프 표시 (Graph display)
탑 리스트 시각화에 맥락을 추가하려면 선택적 표시 모드(Display Mode) 기능을 구성해요.
- 여러 개의 누적 그룹을 표시해서 쿼리의 각 차원의 세부 항목을 보여줘요. 누적(Stacked)은 기본적으로 활성화되어 있어요. 플랫(Flat)으로 전환할 수 있어요.
- 상대(Relative) 표시 모드를 선택해서 값을 총계의 백분율로 표시하거나, 절대(Absolute) 표시 모드를 선택해서 쿼리 중인 데이터의 원시 개수를 표시해요. 참고: 상대 표시는 count 메트릭이나 로그 이벤트 같은 count 데이터에서만 사용할 수 있어요.
- 시각적 서식 규칙(Visual Formatting Rules)에서 항목 값에 따라 조건부 서식을 구성해요.
컨텍스트 링크 (Context links)
컨텍스트 링크는 기본적으로 활성화되어 있으며 켜고 끌 수 있어요. 컨텍스트 링크는 대시보드 위젯을 Datadog 또는 타사 애플리케이션의 다른 페이지와 연결해줘요.
전역 시간 (Global time)
스크린보드와 노트북에서 위젯이 사용자 지정 시간 범위를 가질지 전역 시간 범위를 사용할지 선택해요.
API
이 위젯은 **대시보드 API**와 함께 사용할 수 있어요. 위젯 JSON 스키마 정의에 대해서는 다음 표를 참고하세요.
탑 리스트 위젯의 최상위 필드에는 다음이 있어요.
| 필드 | 타입 | 설명 |
|---|---|---|
| custom_links | object[] | 사용자 지정 링크 목록. |
| description | string | 위젯의 설명. |
| requests [필수] | object[] | 탑 리스트 위젯 요청 목록. |
| time | object | 위젯의 시간 설정. |
| title | string | 위젯 제목. |
| type [필수] | enum | 탑 리스트 위젯 유형. 허용 enum 값: toplist |
각 requests 항목은 conditional_formats, formulas, queries, indexes, limit(count, offset, order), sort 등을 포함할 수 있어요. 전체 예시는 다음과 같아요.
{
"custom_links": [
{
"is_hidden": false,
"label": "Search logs for {{host}}",
"link": "https://app.datadoghq.com/logs?query={{host}}",
"override_label": "logs"
}
],
"description": "string",
"requests": [
{
"apm_query": {
"compute": {
"aggregation": "avg",
"facet": "@duration",
"interval": 5000
},
"group_by": [
{
"facet": "resource_name",
"limit": 50,
"sort": {
"aggregation": "avg",
"facet": "@string_query.interval",
"order": "desc"
}
}
],
"index": "days-3,days-7",
"multi_compute": [
{
"aggregation": "avg",
"facet": "@duration",
"interval": 5000
}
],
"search": {
"query": ""
}
},
"audit_query": {
"compute": {
"aggregation": "avg",
"facet": "@duration",
"interval": 5000
},
"group_by": [
{
"facet": "resource_name",
"limit": 50,
"sort": {
"aggregation": "avg",
"facet": "@string_query.interval",
"order": "desc"
}
}
],
"index": "days-3,days-7",
"multi_compute": [
{
"aggregation": "avg",
"facet": "@duration",
"interval": 5000
}
],
"search": {
"query": ""
}
},
"conditional_formats": [
{
"comparator": ">",
"custom_bg_color": "string",
"custom_fg_color": "string",
"hide_value": false,
"image_url": "string",
"metric": "string",
"palette": "blue",
"timeframe": "string",
"value": 0
}
],
"event_query": {
"compute": {
"aggregation": "avg",
"facet": "@duration",
"interval": 5000
},
"group_by": [
{
"facet": "resource_name",
"limit": 50,
"sort": {
"aggregation": "avg",
"facet": "@string_query.interval",
"order": "desc"
}
}
],
"index": "days-3,days-7",
"multi_compute": [
{
"aggregation": "avg",
"facet": "@duration",
"interval": 5000
}
],
"search": {
"query": ""
}
},
"formulas": [
{
"alias": "string",
"cell_display_mode": "number",
"cell_display_mode_options": {
"trend_type": "area",
"y_scale": "shared"
},
"conditional_formats": [
{
"comparator": ">",
"custom_bg_color": "string",
"custom_fg_color": "string",
"hide_value": false,
"image_url": "string",
"metric": "string",
"palette": "blue",
"timeframe": "string",
"value": 0
}
],
"formula": "func(a) + b",
"limit": {
"count": "integer",
"order": "asc"
},
"number_format": {
"unit": {
"per_unit_name": "bytes",
"type": "canonical_unit",
"unit_name": "bytes"
},
"unit_scale": {
"type": "canonical_unit",
"unit_name": "bytes"
}
},
"style": {
"palette": "classic",
"palette_index": 1
}
}
],
"log_query": {
"compute": {
"aggregation": "avg",
"facet": "@duration",
"interval": 5000
},
"group_by": [
{
"facet": "resource_name",
"limit": 50,
"sort": {
"aggregation": "avg",
"facet": "@string_query.interval",
"order": "desc"
}
}
],
"index": "days-3,days-7",
"multi_compute": [
{
"aggregation": "avg",
"facet": "@duration",
"interval": 5000
}
],
"search": {
"query": ""
}
},
"network_query": {
"compute": {
"aggregation": "avg",
"facet": "@duration",
"interval": 5000
},
"group_by": [
{
"facet": "resource_name",
"limit": 50,
"sort": {
"aggregation": "avg",
"facet": "@string_query.interval",
"order": "desc"
}
}
],
"index": "days-3,days-7",
"multi_compute": [
{
"aggregation": "avg",
"facet": "@duration",
"interval": 5000
}
],
"search": {
"query": ""
}
},
"process_query": {
"filter_by": [],
"limit": "integer",
"metric": "system.load.1",
"search_by": "string"
},
"profile_metrics_query": {
"compute": {
"aggregation": "avg",
"facet": "@duration",
"interval": 5000
},
"group_by": [
{
"facet": "resource_name",
"limit": 50,
"sort": {
"aggregation": "avg",
"facet": "@string_query.interval",
"order": "desc"
}
}
],
"index": "days-3,days-7",
"multi_compute": [
{
"aggregation": "avg",
"facet": "@duration",
"interval": 5000
}
],
"search": {
"query": ""
}
},
"q": "system.load.1",
"queries": [],
"response_format": "timeseries",
"rum_query": {
"compute": {
"aggregation": "avg",
"facet": "@duration",
"interval": 5000
},
"group_by": [
{
"facet": "resource_name",
"limit": 50,
"sort": {
"aggregation": "avg",
"facet": "@string_query.interval",
"order": "desc"
}
}
],
"index": "days-3,days-7",
"multi_compute": [
{
"aggregation": "avg",
"facet": "@duration",
"interval": 5000
}
],
"search": {
"query": ""
}
},
"security_query": {
"compute": {
"aggregation": "avg",
"facet": "@duration",
"interval": 5000
},
"group_by": [
{
"facet": "resource_name",
"limit": 50,
"sort": {
"aggregation": "avg",
"facet": "@string_query.interval",
"order": "desc"
}
}
],
"index": "days-3,days-7",
"multi_compute": [
{
"aggregation": "avg",
"facet": "@duration",
"interval": 5000
}
],
"search": {
"query": ""
}
},
"sort": {
"count": "integer",
"order_by": [
{
"index": 0,
"order": "desc",
"type": "formula"
}
]
},
"style": {
"line_type": "string",
"line_width": "string",
"order_by": "string",
"palette": "string"
}
}
],
"style": {
"display": {
"legend": "automatic",
"type": "stacked"
},
"palette": "string",
"scaling": "string"
},
"time": {
"hide_incomplete_cost_data": false,
"live_span": "5m"
},
"title": "string",
"title_align": "string",
"title_size": "string",
"type": "toplist"
}