본문 바로가기
WIKI 기술 지식 베이스

테이블 위젯

원문 보기 위키 갱신

테이블 위젯 (Table Widget)

출처: 문서

본문

테이블 시각화는 태그 키로 그룹화된 집계 데이터 열을 표시해요. 테이블을 사용해서 여러 데이터 그룹의 값을 비교하고 트렌드, 변화, 이상값을 확인할 수 있어요.

설정 (Setup)

구성 (Configuration)

  1. 그래프로 그릴 데이터를 선택해요.

    • 쿼리 추가(+ Add Query)와 + 공식 추가(+ Add Formula) 버튼을 사용해서 테이블에 추가 열을 더해요.

옵션 (Options)

  • as… 버튼을 클릭해서 별칭(alias)을 설정해 열 헤더 이름을 바꿔요.
  • 검색 바 표시 여부를 구성해요. 자동(Auto)이 기본값이며 위젯 크기에 따라 검색 바를 표시해요. 화면이 너무 작아지면 위젯에서 데이터 표시를 우선시하고 검색 바를 숨기지만, 전체 화면 모드에서는 여전히 사용할 수 있어요.

열 서식 (Column formatting)

열 서식 규칙(Column Formatting Rules)으로 각 열의 셀 값 시각화를 사용자화할 수 있어요. 트렌드와 변화를 시각화하기 위해 데이터에 색상 코드를 만들어요.

  • 임계값 서식: 특정 값 범위를 충족할 때 셀을 색상으로 강조해요.
  • 범위 서식: 값 범위로 셀에 색상을 지정해요.
  • 텍스트 서식: 가독성을 높이기 위해 셀을 별칭 텍스트 값으로 대체해요.
  • 트렌드 정보: 메트릭과 이벤트 쿼리를 시각화해요.

컨텍스트 링크는 기본적으로 활성화되어 있으며 켜고 끌 수 있어요. 컨텍스트 링크는 대시보드 위젯을 Datadog 또는 타사 애플리케이션의 다른 페이지와 연결해줘요.

N/A 값 (N/A values)

테이블 위젯의 열은 서로 독립적으로 쿼리돼요. 이름이 일치하는 겹치는 그룹은 테이블의 행을 형성하기 위해 실시간으로 결합돼요. 이 과정에서 완전히 겹치지 않는 상황이 발생해 N/A 셀이 표시될 수 있어요. 이를 완화하려면:

  • 쿼리의 제한을 더 높은 숫자로 늘려 열 사이의 겹침을 최대화해요.
  • 인사이트를 이끌어 내는 "주도" 열로 간주할 수 있는 열을 기준으로 테이블을 정렬해요.

API

이 위젯은 **대시보드 API**와 함께 사용할 수 있어요. 위젯 JSON 스키마 정의에 대해서는 다음 표를 참고하세요.

테이블 위젯의 최상위 필드에는 다음이 있어요.

필드 타입 설명
custom_links object[] 사용자 지정 링크 목록.
description string 위젯의 설명.
has_search_bar enum 검색 바 표시 제어. 허용 enum 값: always,never,auto
requests [필수] object[] 위젯 정의.
time object 위젯의 시간 설정.
title string 위젯 제목.
type [필수] enum 테이블 위젯 유형. 허용 enum 값: query_table

각 requests 항목은 aggregator, alias, cell_display_mode, conditional_formats, formulas, queries, limit, 그리고 apm_stats_query(테이블 위젯용 APM 통계 쿼리, columns, env, name, primary_tag, resource, service 필드 포함)를 포함할 수 있어요. 전체 예시는 다음과 같아요.

{
  "custom_links": [
    {
      "is_hidden": false,
      "label": "Search logs for {{host}}",
      "link": "https://app.datadoghq.com/logs?query={{host}}",
      "override_label": "logs"
    }
  ],
  "description": "string",
  "has_search_bar": "auto",
  "requests": [
    {
      "aggregator": "string",
      "alias": "string",
      "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": ""
        }
      },
      "apm_stats_query": {
        "columns": [
          {
            "alias": "Requests",
            "cell_display_mode": "number",
            "name": "Reqs",
            "order": "desc"
          }
        ],
        "env": "prod",
        "name": "rack.request",
        "primary_tag": "datacenter:*",
        "resource": "CartsController",
        "row_type": "service",
        "service": "web-store"
      },
      "cell_display_mode": [
        "number"
      ],
      "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
          }
        }
      ],
      "limit": "integer",
      "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": ""
        }
      },
      "order": "desc",
      "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": "string",
      "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"
          }
        ]
      },
      "text_formats": [
        []
      ]
    }
  ],
  "time": {
    "hide_incomplete_cost_data": false,
    "live_span": "5m"
  },
  "title": "string",
  "title_align": "string",
  "title_size": "string",
  "type": "query_table"
}

더 알아보기 (Learn more)