워크플로우 위젯 실행

개요

워크플로우 위젯 실행을 사용하여 대시보드에서 중요 작업을 자동화할 수 있습니다. 시스템 상태에 영향을 미치는 문제를 인지한 시점에 대시보드에서 워크플로우를 트리거합니다. 이렇게 하면 문제 해결 시간을 단축하고 오류 발생 가능성을 줄여 시스템을 계속 구동할 수 있습니다.

설정

  1. 워크플로우 선택하기의 드롭다운 메뉴에서 원하는 워크플로우를 찾습니다.
  2. 대시보드 템플릿 변수를 워크플로우 입력 파라미터 에 매핑합니다. 이렇게 하면 워크플로우를 실행할 때 대시보드 템플릿 변수의 값을 파라미터 입력값에 직접 매핑할 수 있습니다.
  3. 위젯의 이름을 입력하고 저장을 클릭합니다.
워크플로우 실행을 클릭하여 대시보드 위젯에서 워크플로우를 트리거합니다.

워크플로우를 실행하려면 다음에 따릅니다.

  1. 대시보드 위젯에서 워크플로우 실행을 클릭합니다.
  2. 실행 파라미터의 워크플로우 입력값에 매핑한 템플릿 변수가 자동으로 채워집니다. 매핑되지 않은 실행 파라미터에 값을 입력하거나 필요한 경우 기존 값을 편집합니다.
  3. 실행을 클릭하여 워크플로우를 실행합니다.

API

이 위젯을 **대시보드 API**와 함께 사용할 수 있습니다. 위젯 JSON 스키마 정의와 관해서는 다음 테이블을 참고하세요.

Expand All

항목

유형

설명

custom_links

[object]

List of custom links.

is_hidden

boolean

The flag for toggling context menu link visibility.

label

string

The label for the custom link URL. Keep the label short and descriptive. Use metrics and tags as variables.

link

string

The URL of the custom link. URL must include http or https. A relative URL must start with /.

override_label

string

The label ID that refers to a context menu link. Can be logs, hosts, traces, profiles, processes, containers, or rum.

inputs

[object]

Array of workflow inputs to map to dashboard template variables.

name [required]

string

Name of the workflow input.

value [required]

string

Dashboard template variable. Can be suffixed with '.value' or '.key'.

time

object

Time setting for the widget.

live_span

enum

The available timeframes depend on the widget you are using. Allowed enum values: 1m,5m,10m,15m,30m,1h,4h,1d,2d,1w,1mo,3mo,6mo,week_to_date,month_to_date,1y,alert

title

string

Title of your widget.

title_align

enum

How to align the text on the widget. Allowed enum values: center,left,right

title_size

string

Size of the title.

type [required]

enum

Type of the run workflow widget. Allowed enum values: run_workflow

default: run_workflow

workflow_id [required]

string

Workflow id.

{
  "custom_links": [
    {
      "is_hidden": false,
      "label": "Search logs for {{host}}",
      "link": "https://app.datadoghq.com/logs?query={{host}}",
      "override_label": "logs"
    }
  ],
  "inputs": [
    {
      "name": "Environment",
      "value": "$env.value"
    }
  ],
  "time": {
    "live_span": "5m"
  },
  "title": "string",
  "title_align": "string",
  "title_size": "string",
  "type": "run_workflow",
  "workflow_id": "<workflow_id>"
}

참고 자료

Additional helpful documentation, links, and articles: