> For the complete documentation index, see [llms.txt](https://docs.finout.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.finout.io/billing-integrations/observability-platforms/connect-to-grafana.md).

# Connect to Grafana

## Overview

Finout's Grafana Cloud integration ingests cost and usage data via Grafana's FOCUS-standardized API, and makes it available in MegaBill alongside your other cloud and SaaS services, for a unified view.

With this integration, you can:

* Connect one or more Grafana Cloud organizations
* Break down costs by service (Metrics, Logs, Traces, Profiles, and more), service category and resource name.&#x20;
* Include Grafana Cloud cost and usage data in custom dashboards, set up alerts to track anomalies, and incorporate it into your financial plans

{% hint style="info" %}
Finout uses read-only access to the Grafana Cloud FOCUS API. It does not perform actions that can create, modify, or incur costs.
{% endhint %}

### Before you start

Connecting Grafana Cloud requires a Cloud Access Policy token scoped to `org-billing-focus:read`.

{% hint style="success" %}
**Prerequisite:** You must have the **Admin** role within the Grafana Cloud Portal to create an access policy and token at the organization level.
{% endhint %}

### Generate a Grafana API token

1. Sign in to Grafana Cloud and select your organization from the drop-down at the top of the page.
2. Locate **Security** in the left-hand navigation and select **Access Policies**.
3. Select **Create access policy**.
4. Enter a **Display Name** for the access policy.
5. From the **Realm** drop-down, select your organization (so the policy applies across all stacks).
6. Under **Scopes**, select **org-billing-focus:read**.
7. Select **Create** to add the access policy.
8. Choose the access policy you just created, then select **Add token** to open the **Create new token** dialog.
9. Enter a **Display name** for the token, and optionally an expiration date.
10. Select **Create**, then **Copy to clipboard** to copy the generated token — you'll need it in Finout in the next step.

{% hint style="info" %}
The token is only shown once. Copy and save it in a safe place before continuing.
{% endhint %}

### 2. Integrate Grafana Cloud with Finout

1. In Finout, navigate to **Settings > Cost Centers**.
2. Under **Grafana Cloud**, click **Connect**.

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

3. Fill in the following fields:
   1. **Cost Center Name** — pre-filled with "Grafana Cloud"; you can edit this if you'd like a different display name.
   2. **Grafana Org Name** — your Grafana org slug (for example, `mycompany`), found in your Grafana Cloud URL.
   3. **Grafana API Token** — the token generated in step 1.
4. Click **Complete Setup**.

Finout validates the connection immediately by querying Grafana API with the values you entered. If the token or org name is invalid, or the token doesn't have the `org-billing-focus:read` scope, you'll see an error before the Cost Center is created.

<figure><img src="/files/8FfMzUmU3gOb39lvQ3wI" alt=""><figcaption></figcaption></figure>

Your Cost Center is created, and data becomes available in Finout within 24 hours.&#x20;

### FAQ

**How far back can Finout backfill Grafana Cloud cost data?**

Up to 60 days upon setup. Grafana’s FOCUS API provides a fixed trailing 60-day window of cost data and does not support backfilling beyond that timeframe.


---

# 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://docs.finout.io/billing-integrations/observability-platforms/connect-to-grafana.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.
