# Datadog

## Overview

Datadog gives you the ability to create monitors that actively check metrics, integration availability, network endpoints, and more.

Using the Fylamynt | Datadog integration you can see the list of available monitors and pick the monitor to trigger a workflow when it goes into the state of Alert.

## Use Cases

The integration between Fylamynt and Datadog lets you:

* Trigger a workflow in Fylamynt, when a specific DataDog monitor goes into the state of ALERT.
* Retrieve data from Datadog Monitors based on a search query.
* Returns the test result from all the synthetic tests.

## Configure Datadog in Fylamynt

* Navigate to **Settings** > **Integrations** > **Datadog**
* Configure a new integration instance

Details needed to set up **Datadog instance** in **Fylamynt**:

<table data-header-hidden><thead><tr><th>Parameter</th><th width="343.3333333333333">Description</th><th>Required</th></tr></thead><tbody><tr><td><strong>Parameter</strong></td><td><strong>Description</strong></td><td><strong>Required</strong></td></tr><tr><td>Datadog API Key</td><td>API key for your Datadog instance</td><td>True</td></tr><tr><td>Datadog Application Key</td><td>Application key for your Datadog instance</td><td>True</td></tr><tr><td>External ID</td><td>Identifier that identifies the tenant, to be added into HTTP headers by Datadog</td><td>True</td></tr><tr><td>Webhook API Key Name</td><td>Fylamynt API Key Name</td><td>True</td></tr><tr><td>Datadog Webhook Name</td><td>Fylamynt webhook name to be used by Datadog service</td><td>True</td></tr><tr><td>Datadog Webhook URL</td><td>Fylamynt webhook URL to be used by Datadog service</td><td>True</td></tr></tbody></table>

Follow the steps listed below in your **Datadog Account** and get the desired parameters to enter in **Fylamynt**. To configure Datadog you will require access to **Organization settings** with **write permission** for **API Keys** and **Application Keys.**

* Login to your **Datadog Account**
* Navigate to **Organization settings**
  * Click on your username in the bottom left corner
  * Select Organization Settings
  * ![](/files/vRe7mYWdcNPbP7CVS99Q)
* Select Access -> **API Keys**
* Click **+** **New Key**
  * Provide a name for the new API key
  * Click **Create Key**
  * ![](/files/Zwgt3vqVi65z2j6ebXQi)
  * Click **Copy Key**
    * Paste the new API Key into the **Datadog API Key** field on the Authorize Fylamynt card on the Datadog Integration settings page.
  * Close the window
* Select Access -> **Application Keys**
* Click **+** **New Key**
  * Provide a name for the new Application key
  * Click **Create Key**
  * ![](/files/qBhKtOwixaYUhQOTGCfc)
  * Click **Copy Key**
    * Paste the new Application Key into the **Datadog Application Key** field on the Authorize Fylamynt card on the Datadog Integration settings page.
  * Close the window
* Navigate to **Integrations -> Integrations**
* ![](/files/g11EczQBEpArNNATJziK)
* Go to the Team page
* Search and select for **webhooks**
* ![](/files/gwodRdJDE2qcLErpSF0j)
* Click **+ New** button to create a new Webhook
* Complete “New Webhook” panel using the following details
  * Copy **Datadog Webhook Name** from the Authorize Fylamynt card as the **Name** of the New Webhook
  * Copy **Datadog Webhook URL** from the Authorize Fylamynt card as the **URL** of the New Webhook
  * Add **"alert\_id": "$ALERT\_ID"** in the JSON object for Payload
    * Optionally, add or remove any other fields
  * Check the **Custom Headers** box
    * Copy the JSON header information below and paste it into the Custom Header field
    * ```
      {
          "x-api-key": "<fylamynt-api-key>",
          "fylamynt-external-id": "<fylamynt-external-id>",
          "Content-Type": "application/json"
      }
      ```
    * Replace \<fylamynt-api-key>
      * From the Authorize Fylamynt card, choose one of the Webhook API Key Name from the dropdown, and the corresponding Webhook API Key Value should be shown
        * If no options are available for the Webhook API Key Name, first go to **Settings --> Resources -> API Keys** to create a New API Key
      * Copy the **Webhook API Key Value** and replace \<fylamynt-api-key> in the header.
    * Replace \<fylamynt-external-id>
      * From Authorize Fylamynt card, copy the **External ID** and replace \<fylamynt-external-id> in the header
* Click **Save** to complete Webhook creation

![](/files/mOJJj5TVnN2Hj4ovE5j8)

* Click on the **Authorize** button to complete the integration between Fylamynt and Datadog

## Integration Actions

You can add these actions in the Fylamynt workflow builder, as part of your workflow.

1. [Datadog Alert Trigger](#datadog-alert-trigger)
2. [Datadog Get API Test Results](#datadog-get-api-test-results)
3. [Datadog Search Monitors](#datadog-search-monitors)

### Datadog Alert Trigger

The integration node triggers the automatic execution of a workflow from a selected **Datadog Monitor.**

When creating a workflow, you are presented with a wizard to select the trigger type to use.

* On the workflow page, select **New Workflow**
* Enter the name of the Workflow.
* Select the **Datadog** trigger type.
* Click **Create Workflow**
* ![](/files/t0jcKFh5Ako7KZL9hz0u)

#### Configure the automatic execution of a workflow <a href="#fylamynt-task-management" id="fylamynt-task-management"></a>

To automatically run workflows with the Datadog Alert trigger, the incident type and assignment need to be configured. Follow the step-by-step instructions provided on the[ Incident Management - Automatic workflow execution](https://docs.fylamynt.com/getting-started-1/7.-incident-management-automatic-workflow-execution) page.

### Datadog Get API Test Results

Get the last 50 test results summaries for all Synthetics API tests.

**Input**

| **Parameter Name** | **Description**                                | **Required** |
| ------------------ | ---------------------------------------------- | ------------ |
| Start Timestamp    | Date-time from which to start querying results | False        |
| End Timestamp      | Date-time up to which to query results         | False        |

**Output**

| **Parameter Name** | **Type** | **Description**                       |
| ------------------ | -------- | ------------------------------------- |
| result             | Object   | A list of test result objects in JSON |

**Action Example**

![](/files/-Mkuzni3cmxRTvq2DSyw)

![](/files/-MkuzqiV5J6wpc8-SNPo)

### Datadog Search Monitors

Perform a search query and return matching monitors

**Input**

| **Parameter Name** | **Description**                                                                                                                                                        | **Required** |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |
| Query              | The query to be executed. Query documentation: <https://docs.datadoghq.com/monitors/manage_monitor/#find-the-monitors>                                                 | True         |
| Page Index         | Page to start paginating from                                                                                                                                          | False        |
| Monitors Per Page  | Number of monitors to return per page                                                                                                                                  | False        |
| Sort Order         | String for sort order, composed of field and sort order separate by a comma, e.g. name,asc. Supported sort directions: asc, desc. Supported fields: name, status, tags | False        |

**Output**

| **Parameter Name** | **Type** | **Description**            |
| ------------------ | -------- | -------------------------- |
| result             | Object   | A list of monitors in JSON |

**Action Example**

![](/files/-MkuzytEs78U3Yf0ihSl)

![](/files/-Mkv-19fq0M-_RRCsEk9)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fylamynt.com/integrations/datadog.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
