> For the complete documentation index, see [llms.txt](https://docs.north.cloud/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.north.cloud/docs/features/cost-loops/datadog.md).

# Datadog

Learn how to connect your Datadog organization to North as a Cost Loop.

Connect Datadog to North as a Cost Loop to see your Datadog observability and APM (application performance monitoring) spend beside your cloud spend. North reports Datadog spend by product, such as Infra Hosts, Containers, and Indexed Logs. You can also split and filter Datadog spend by your Datadog tags.

North reads your Datadog cost with a Service Access Token.

## Before You Start

You need three things in Datadog:

* **Permission to manage access.** You create a role, a service account, and a Service Access Token for North.
* **Custom roles.** Your Datadog organization must have custom roles turned on before you can create the role for North. See [Datadog custom roles](https://docs.datadoghq.com/account_management/rbac/).
* **Your Datadog site.** Your Datadog site is the domain in your browser's address bar when you sign in to Datadog, for example `app.datadoghq.com` or `app.datadoghq.eu`.

## Connect Datadog

{% stepper %}
{% step %}

### Open the Connect Screen

Open **Settings**, then **Integrations**, then **Add accounts**. Under **Cost Loops**, select **Datadog**.
{% endstep %}

{% step %}

### Opt In to Datadog Cloud Cost

{% hint style="info" %}
If you have already opted into Cloud Cost, you can skip this step.
{% endhint %}

In Datadog, open **Cloud Cost** in the left sidebar. This Datadog feature is free. You only need to opt in.

1. On the **Manage your Datadog spend** card, click **Opt in**.
2. If Datadog then asks you to set up Usage Attribution, skip it.

Skip the **Control your cloud spend** card. It is a separate paid Datadog add-on for AWS, Azure, and Google Cloud bills.

Complete this opt-in before you connect Datadog to North. North reads your Datadog cost from Datadog Cloud Cost Management. See [Datadog costs](https://docs.datadoghq.com/cloud_cost_management/datadog_costs/) for more guidance.
{% endstep %}

{% step %}

### Create a Role for North

In Datadog, open **Organization Settings**, then **Roles**. Create a role for North with two permissions:

* **Usage Read**
* **Billing Read**
  {% endstep %}

{% step %}

### Create a Service Account

In Datadog, open **Organization Settings**, then **Service Accounts**. Create a service account for North. Assign it the role that you created for North.

See [Datadog service accounts](https://docs.datadoghq.com/account_management/org_settings/service_accounts/) for more guidance.
{% endstep %}

{% step %}

### Create a Service Access Token

In Datadog, create a Service Access Token on the service account for North. Set its expiration to **Never**. Give it these three scopes:

* `usage_read`
* `billing_read`
* `timeseries_query`

{% hint style="warning" %}
Set the expiration to Never. If the Datadog token expires, North stops receiving your Datadog cost data until you supply a new token.
{% endhint %}
{% endstep %}

{% step %}

### Enter Your Connection Details

On the North connect screen, fill in the Datadog fields:

* **Connection name.** A label to recognize this account by. It becomes the card title on your homepage.
* **Datadog site.** The site that matches the domain in your browser's address bar.
* **Service Access Token.** The token that you created for North. It starts with `ddsat_`.
  {% endstep %}

{% step %}

### Verify and Connect

Click **Verify & Connect**. North looks up your Datadog organization with the token. If the connection works fine, you should see a success message.
{% endstep %}
{% endstepper %}

## If Verification Fails

When a Datadog check fails, the error message states the missing scope and the role permission that goes with it. Add the missing item in Datadog. Then click **Verify & Connect** again.

If North cannot connect to Datadog, check two things:

* **The token type.** The Datadog token must be a Service Access Token that starts with `ddsat_`.
* **The site.** The selected site must match the domain in your address bar. Each Datadog site is a separate deployment, and a token works only on its own site.

## After You Connect

{% hint style="info" %}
Your Datadog cost data can take a few days to appear in North after you opt in to Datadog Cloud Cost. Datadog makes the current month available a few hours after you opt in, and earlier months can take longer. North checks Datadog for new cost data each day and imports it as soon as it is available.
{% endhint %}

Datadog spend appears on your homepage as a card that carries your connection name. You can also add Datadog to a Streams view, select it in Visibility, and ask Noros about it. See [Viewing Cost Loop Data](/docs/features/cost-loops/viewing-cost-loop-data.md) for the detail available on each surface.

## What North Reads

North reads daily cost for your Datadog organization from Datadog Cloud Cost Management. North receives this cost by product, by pricing term, and by tag.

* **Product** is the Datadog product you are billed for, such as Infra Hosts or Indexed Logs (15 Day Retention).
* **Pricing term** is **Committed** for usage that your Datadog commitment covers, and **Standard** for on-demand usage.
* **Tags** are the tag keys that Datadog Cloud Cost Management attributes your cost to, such as `env`, `service`, or `team`.

{% hint style="info" %}
**A note on tags with more than one value.** Datadog can report one cost with two values of the same tag, such as `env:dev` and `env:prod`. Streams and Visibility show that cost once, as the value `dev,prod`. A filter on `prod` in Streams or Visibility includes only `prod` spend, while the same filter in Datadog also includes `dev,prod` spend. To match Datadog, select both `prod` and `dev,prod`.
{% endhint %}

Datadog reports cost by day. For hourly views, North allocates each day's Datadog cost across its hours by your hourly Datadog usage. Datadog bills some products on a P99 (99th percentile) basis, and those products have no hourly split. North spreads their cost evenly through the day. Daily and monthly totals do not change.

### Historical data

North reads up to 12 months of Datadog cost: the current month and the 11 months before it. If your Datadog billing history is shorter, North reads from the month your history starts.

## Limitations

You cannot split Datadog spend by child organization.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.north.cloud/docs/features/cost-loops/datadog.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
