개요
워크플로우 위젯 실행을 사용하여 대시보드에서 중요 작업을 자동화할 수 있습니다. 시스템 상태에 영향을 미치는 문제를 인지한 시점에 대시보드에서 워크플로우를 트리거합니다. 이렇게 하면 문제 해결 시간을 단축하고 오류 발생 가능성을 줄여 시스템을 계속 구동할 수 있습니다.
설정
- 워크플로우 선택하기의 드롭다운 메뉴에서 원하는 워크플로우를 찾습니다.
- 대시보드 템플릿 변수를 워크플로우 입력 파라미터 에 매핑합니다. 이렇게 하면 워크플로우를 실행할 때 대시보드 템플릿 변수의 값을 파라미터 입력값에 직접 매핑할 수 있습니다.
- 위젯의 이름을 입력하고 저장을 클릭합니다.
워크플로우를 실행하려면 다음에 따릅니다.
- 대시보드 위젯에서 워크플로우 실행을 클릭합니다.
- 실행 파라미터의 워크플로우 입력값에 매핑한 템플릿 변수가 자동으로 채워집니다. 매핑되지 않은 실행 파라미터에 값을 입력하거나 필요한 경우 기존 값을 편집합니다.
- 실행을 클릭하여 워크플로우를 실행합니다.
API
이 위젯을 **대시보드 API**와 함께 사용할 수 있습니다. 위젯 JSON 스키마 정의와 관해서는 다음 테이블을 참고하세요.
Expand All
The flag for toggling context menu link visibility.
The label for the custom link URL. Keep the label short and descriptive. Use metrics and tags as variables.
The URL of the custom link. URL must include http
or https
. A relative URL must start with /
.
The label ID that refers to a context menu link. Can be logs
, hosts
, traces
, profiles
, processes
, containers
, or rum
.
Array of workflow inputs to map to dashboard template variables.
Name of the workflow input.
Dashboard template variable. Can be suffixed with '.value' or '.key'.
Time setting for the widget.
hide_incomplete_cost_data
Whether to hide incomplete cost data in the widget.
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
Used for arbitrary live span times, such as 17 minutes or 6 hours.
hide_incomplete_cost_data
Whether to hide incomplete cost data in the widget.
Type "live" denotes a live span in the new format.
Allowed enum values: live
Unit of the time span.
Allowed enum values: minute,hour,day,week,month,year
Used for fixed span times, such as 'March 1 to March 7'.
Start time in seconds since epoch.
hide_incomplete_cost_data
Whether to hide incomplete cost data in the widget.
End time in seconds since epoch.
Type "fixed" denotes a fixed span.
Allowed enum values: fixed
How to align the text on the widget.
Allowed enum values: center,left,right
Type of the run workflow widget.
Allowed enum values: run_workflow
default: run_workflow
{
"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": {
"hide_incomplete_cost_data": false,
"live_span": "5m"
},
"title": "string",
"title_align": "string",
"title_size": "string",
"type": "run_workflow",
"workflow_id": "<workflow_id>"
}
참고 자료