Cette page n'est pas encore disponible en français, sa traduction est en cours.
Si vous avez des questions ou des retours sur notre projet de traduction actuel,
n'hésitez pas à nous contacter.
Workflow Automation is not supported for your selected
Datadog site (
).
You can trigger a workflow manually or automatically.
A workflow can either run with the identity of the user who owns it, or with the identity of a service account associated with the workflow. For more information on service accounts, see Service accounts for Workflow Automation.
Manually trigger a workflow
To trigger a workflow manually:
- From the workflow page, click Run.
- Enter the values for existing trigger variables.
- When you’re ready to run the workflow, click Save & Run.
Trigger a workflow from a Dashboard
To trigger a workflow from a Dashboard, add the Run Workflow widget:
- From your Dashboard, click Add Widget.
- Search for
workflows
and add the Run Workflow widget. - Under Select the workflow, find your workflow in the dropdown menu.
- Map dashboard template variables to workflow input parameters. This allows the values of your dashboard template variables to be mapped directly to the input parameters when you run the workflow.
- Enter a title for the widget and click Save.
To run the workflow:
- Click Run Workflow on your dashboard widget.
- Under Execution parameters, any template variables you mapped to workflow inputs are automatically populated. Enter the values for any unmapped execution parameters, or edit the existing values if needed.
- Click Run to run the workflow.
Trigger a workflow from a Monitor
To trigger a workflow from a Monitor:
- On the workflow canvas, click Add an Automated Trigger and select @mention.
- Save your Workflow.
- Navigate to the Monitors page in Datadog.
- Find the monitor you’d like to use to trigger the workflow and edit it, or create a new monitor.
- In the message section, add the full workflow mention name:
- The mention name should start with
@workflow-
. For example, @workflow-my-workflow
- To pass trigger variables into the workflow, use a comma-separated list with the syntax
@workflow-name(key=value, key=value)
. For example, @workflow-my-workflow(name="Bits", alert_threshold=threshold)
- Save the monitor.
Each time the monitor threshold is hit, the monitor triggers a workflow run.
Scheduled and triggered workflows don't run automatically until you've published them. To publish the workflow, click
Publish from the workflow's page. Published workflows accrue costs based on workflow executions. For more information, see the
Datadog Pricing page.
Trigger a workflow from a Security Signal
You can trigger a Workflow automatically for any Security Signal, or manually trigger a Workflow from a Cloud SIEM Security Signal panel.
Trigger a workflow automatically from Security Signal Notification Rules
You can set up a workflow to trigger every time a Security Signal Notification Rule fires.
To trigger a workflow from a Notification Rule:
- On the workflow canvas, click Add an Automated Trigger and select @mention.
- Next to @workflow-, enter a mention name for the trigger. Your mention name must be unique.
- Save your Workflow.
- From the Setup & Configuration page, find the Detection Rule you’d like to use to trigger your workflow, or create a new rule.
- In the Recipient section, add the full workflow mention name. For example,
@workflow-my-workflow
. - Click Save and Activate.
Each time the Notification Rule fires, it triggers a workflow run.
Scheduled and triggered workflows don't run automatically until you've published them. To publish the workflow, click
Publish from the workflow's page. Published workflows accrue costs based on workflow executions. For more information, see the
Datadog Pricing page.
Trigger a workflow manually from Cloud SIEM Security Signals
You can manually start a workflow from a Cloud SIEM Security Signal panel.
- Click Run Workflow at the top of the Security Signal panel.
- In the search modal, enter the name of the workflow you want to run. Select the workflow.
- If your workflow requires input parameters, enter the values as required. You can copy the values from the Signal object JSON displayed next to the input parameters, and paste them into the parameter fields.
- Click Run.
- You can see the workflow run status in the Workflow section of the Security Signal.
For additional examples of Security workflows you can automate, see Automate Security Workflows with Workflow Automation.
Trigger a workflow on a schedule
To schedule a workflow run:
- On the workflow canvas, click Add an Automated Trigger and select Schedule.
- Click Create to create a service account. For more information, see Use a service account.
- Enter a time and frequency for the run.
- (Optional) Enter a description for the workflow in the Memo field.
- Click Save.
Scheduled and triggered workflows don't run automatically until you've published them. To publish the workflow, click
Publish from the workflow's page. Published workflows accrue costs based on workflow executions. For more information, see the
Datadog Pricing page.
Run history
After you trigger a workflow, the workflow page switches to the workflow’s Run History. Click Configuration or Run History in the top-left to switch between the configuration and run history views.
Use run history to watch the progress of a triggered workflow, or debug a failed step. Clicking on a failed step gives you the inputs, outputs, and execution context for the step, as well as the associated error message. The example below shows a failed GitHub pull request status step. The error message shows that the step failed due to missing permissions:
The initial run history for a workflow provides a panel with the list of previous workflow executions and whether each execution succeeded or failed. Failures include a link to the failed workflow step. Click on a workflow execution in the list to inspect it. You can return to the initial execution history at any time by clicking anywhere on the workflow canvas.
Further reading
Documentation, liens et articles supplémentaires utiles: