> For the complete documentation index, see [llms.txt](https://help.isdown.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.isdown.app/integrations/how-to-set-up-datadog-integration/how-to-create-custom-widgets-in-datadog.md).

# How to Create Custom Widgets in Datadog

By default, IsDown creates a dashboard with some useful widgets that are more focused on real-time data and trying to understand what's wrong with your vendors quickly.

On this page, we'll list other widgets that should be available with the current data set sent from IsDown to Datadog.

### Services with the most outages

<figure><img src="/files/zdqKnLZcsy2HrTy6cBap" alt=""><figcaption></figcaption></figure>

<details>

<summary>How to add the widget?</summary>

Click the "Add Widgets" button, choose the Treemap widget, then click JSON in the "Graph your data" and paste the following JSON code.

{% code overflow="wrap" lineNumbers="true" %}

```json
{
    "type": "treemap",
    "requests": [
        {
            "response_format": "scalar",
            "queries": [
                {
                    "data_source": "events",
                    "name": "query1",
                    "indexes": [
                        "*"
                    ],
                    "compute": {
                        "aggregation": "cardinality",
                        "metric": "@evt.id"
                    },
                    "group_by": [
                        {
                            "facet": "@aggregation_key",
                            "limit": 100,
                            "sort": {
                                "order": "desc",
                                "aggregation": "cardinality",
                                "metric": "@evt.id"
                            }
                        }
                    ],
                    "search": {
                        "query": "source:isdown status:(warn OR error)"
                    }
                }
            ],
            "formulas": [
                {
                    "formula": "query1"
                }
            ]
        }
    ]
}
```

{% endcode %}

</details>

### Number of outages by time and service

<figure><img src="/files/TG5GuTO35CjERGFNPy81" alt=""><figcaption></figcaption></figure>

<details>

<summary>How to add the widget?</summary>

Click the "Add Widgets" button, choose the Timeseries widget, then click JSON in the "Graph your data" and paste the following JSON code.

```json
{
    "type": "timeseries",
    "requests": [
        {
            "style": {
                "palette": "semantic",
                "type": "solid",
                "width": "normal"
            },
            "type": "bars",
            "formulas": [
                {
                    "formula": "query1"
                }
            ],
            "queries": [
                {
                    "data_source": "events",
                    "name": "query1",
                    "indexes": [
                        "*"
                    ],
                    "compute": {
                        "aggregation": "cardinality",
                        "metric": "@evt.id",
                        "interval": 86400000
                    },
                    "group_by": [
                        {
                            "facet": "@aggregation_key",
                            "limit": 10,
                            "sort": {
                                "order": "desc",
                                "aggregation": "cardinality",
                                "metric": "@evt.id"
                            }
                        }
                    ],
                    "search": {
                        "query": "source:isdown status:(warn OR error)"
                    }
                }
            ],
            "response_format": "timeseries"
        }
    ]
}
```

</details>

### Dashboard with checks

<figure><img src="https://s3.amazonaws.com/dd-app-listings/isdown-isdown/media/health_dashboard_cloud_providers.jpg" alt=""><figcaption></figcaption></figure>

<details>

<summary>How to add the widget?</summary>

To add all these checks, you will need to do it one by one.&#x20;

1. Go to the Dashboard you will want to add these widgets.
2. Click "Add Widget"
3. Search for "Check"

   <figure><img src="/files/37C13IupXQnzAEaxvJhJ" alt=""><figcaption></figcaption></figure>
4. Fill in the fields according to the picture. In Reported By choose the service (host) that you want to track.

   <figure><img src="/files/pN7xJrJ5QzHZCjmyNr7A" alt=""><figcaption></figcaption></figure>
5. Duplicate and replace this widget for how many services you want it for.

</details>

***

**Related Articles**

* [**How to Set Up Datadog Integration**](https://help.isdown.app/integrations/setup-datadog)
* [**How to Create Dashboards in Datadog**](https://docs.datadoghq.com/dashboards/)
* [**Datadog Widget Documentation**](https://docs.datadoghq.com/dashboards/widgets/)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://help.isdown.app/integrations/how-to-set-up-datadog-integration/how-to-create-custom-widgets-in-datadog.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
