Widget Run Workflow

Descripción general

El widget Run Workflow le permite automatizar tareas críticas desde los Dashboards. Active sus flujos de trabajo desde un Dashboard en el momento en que detecte un problema que afecte la salud de su sistema. Esto mantiene sus sistemas en funcionamiento al mejorar el tiempo de resolución y reducir la posibilidad de errores.

Configuración

  1. En Select the workflow, busque su flujo de trabajo en el menú desplegable.
  2. Asigne las variables de plantilla del Dashboard a los parámetros de entrada del flujo de trabajo. Esto permite que los valores de las variables de plantilla de su Dashboard se asignen directamente a los parámetros de entrada cuando ejecuta el flujo de trabajo.
  3. Ingrese un título para el widget y haga clic en Save.
Haga clic en Run Workflow para activar un flujo de trabajo desde el widget Dashboard.

Para ejecutar el flujo de trabajo:

  1. Haga clic en Run Workflow en el widget de su Dashboard.
  2. En Run parameters, cualquier variable de plantilla que haya asignado a las entradas del flujo de trabajo se completa automáticamente. Ingrese los valores para cualquier parámetro de ejecución no asignado, o edite los valores existentes si es necesario.
  3. Haga clic en Run para ejecutar el flujo de trabajo.

API

Este widget se puede utilizar con la Dashboards API. Consulte la siguiente tabla para ver la definición del esquema JSON del widget:

Expand All

Campo

Type

Descripción

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.

description

string

The description of the widget.

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

 <oneOf>

Time setting for the widget.

Object 1

object

Wrapper for live span

hide_incomplete_cost_data

boolean

Whether to hide incomplete cost data in 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

Show 7 more,1mo,3mo,6mo,week_to_date,month_to_date,1y,alert

<type=live>

object

Used for arbitrary live span times, such as 17 minutes or 6 hours.

hide_incomplete_cost_data

boolean

Whether to hide incomplete cost data in the widget.

type [required]

enum

Type "live" denotes a live span in the new format. Allowed enum values: live

unit [required]

enum

Unit of the time span. Allowed enum values: minute,hour,day,week,month,year

value [required]

int64

Value of the time span.

<type=fixed>

object

Used for fixed span times, such as 'March 1 to March 7'.

from [required]

int64

Start time in milliseconds since epoch.

hide_incomplete_cost_data

boolean

Whether to hide incomplete cost data in the widget.

to [required]

int64

End time in milliseconds since epoch.

type [required]

enum

Type "fixed" denotes a fixed span. Allowed enum values: fixed

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"
    }
  ],
  "description": "string",
  "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>"
}

Lecturas adicionales

Documentación, enlaces y artículos útiles adicionales: