Datadog: Search Logs

📘

Availability

This workflow action is available on our Business and Enterprise for Incident Management pricing plans. Please contact our Sales Team to upgrade to an account with this action.

Description

Retrieve logs from Datadog using search queries and filters.

Instructions

  1. If you have not done so already, please follow our instructions to Create an Incident Workflow.
  2. When the instructions prompt you to add actions , select this action.
  3. Enter the following Inputs and then click Save. Continue following instructions to Publish the Workflow. When the action runs, you will see the Outputs listed below.

Inputs

📘

Field References

Fields with the {+} icon accept Field References, which can be useful for referencing incident data or outputs created in prior workflow steps. To add Field References, click {+}, or enter {{, and select relevant fields. Please see our Field References article for more information.


NameDescription
Connection InputSelect a Workflow Integration or click New Datadog Connection to establish a new one. For US1 region, this will be the search log url: https://api.datadoghq.com/api/v2/logs/events/search.
QueryThe search query string for logs.
Start TimeSelect a value from the dropdown. This represents the logs start time. Default value 'Past 1 Hour.
End TimeSelect a value from the dropdown. This represents the logs end time. Default value Now.
SortSort order for the logs. Default value: timestamp descending.
LimitThe maximum number of events in the response.

Outputs

NameDescription
LogsThe JSON array of log entries that were retrieved.
Log CountTotal number of matching logs returned.
Query UsedThe processed query string that was sent to Datadog.
Time Range StartThe start time used for the search.
Time Range EndThe end time used for the search.
Has More ResultsWhether there are more results available for pagination.
Next Page TokenToken for retrieving the next page of results.
Search DurationAPI response time in milliseconds.
ResultValue that shows if the action was successful or not. Either Success or Failed.
Result SummaryBrief description of what the action did or if it failed.
ErrorBrief description if the action failed.