Connecting to Grafana Cloud

Connect your Grafana Cloud accounts to CloudZero to bring your Grafana Cloud cost data into a unified view of all your cloud and AI spend. CloudZero organizes your Grafana Cloud costs, along with your other costs, into categories (called Dimensions) that matter most to your business. For example: business unit, team, product, feature, environment, customer, or virtually anything else. Once connected and organized, you can quickly answer questions about your spend that matter to your stakeholders.

This guide covers creating a Grafana Cloud access policy token and configuring the connection in CloudZero. CloudZero ingests the billed usage for your Grafana Cloud organization and attributes it to the stacks that generated it. The connection is read-only.

What you need

  • CloudZero user with data configuration permissions
  • A Grafana Cloud organization on a paid plan
  • The Admin role in your Grafana Cloud organization, which is required to create access policies

Step 1: Find your organization slug

Your organization slug is the identifier in your Grafana Cloud organization URL. For example, in https://grafana.com/orgs/acme-corp, the slug is acme-corp.

  1. Sign in to Grafana Cloud.
  2. Select your organization and copy the slug from the URL.

Step 2: Create an access policy token in Grafana Cloud

CloudZero connects with a token that belongs to a set of permissions you define in Grafana Cloud (called an access policy). For full details, see Grafana's Create access policies and tokens.

  1. In Grafana Cloud, select your organization, then go to Security > Access Policies.
  2. Select Create access policy.
  3. Enter a descriptive Display Name (for example, "CloudZero Integration").
  4. From the Realm drop-down, select your organization (all stacks). CloudZero requires the organization realm.
  5. Under Scopes, add billing-metrics:read and orgs:read. If a scope isn't listed, select it from the Add scope drop-down. CloudZero needs no other scopes.
  6. Select Create.
  7. On the new policy, select Add token.
  8. Enter a Display name for the token and set an Expiration date that matches your security policy.
  9. Select Create.
  10. Copy the token (starts with glc_) and store it securely. Grafana Cloud displays the token only once.
⚠️

Use an access policy token that starts with glc_. Service account tokens created inside a Grafana stack (prefixed glsa_) are not supported.

Step 3: Configure the connection in CloudZero

  1. In CloudZero, go to Settings > Connections.
  2. Select Create Connection + and select the Grafana tile.
  3. Enter the connection details:
FieldValue
Connection NameA name for this connection in CloudZero
Organization SlugThe slug from Step 1
Access Policy TokenThe token from Step 2
Fixed IP EgressOptional; see Fixed IP egress
  1. Select Test to confirm CloudZero can read your billing data.
  2. Select Create Connection.

What to expect

After you connect, CloudZero begins ingesting your Grafana Cloud billed usage. Costs for past months appear across the platform within 24 hours. Current-month costs can change until Grafana Cloud finalizes the month's bill. Once data is available, you can view costs broken down by Grafana Cloud billing dimension (for example, Grafana Cloud Logs), stack, and stack labels.

From there, your Grafana Cloud costs work like any other cost data in CloudZero. For example, you can organize them by team or product using Dimensions, track trends in Dashboards, set Budgets, or ask questions in the AI Hub.

Each connection covers one Grafana Cloud organization. To bring in costs from more than one organization, create a connection for each.

If Test reports "API access forbidden" or "API access unauthorized," check the following:

  • The token starts with glc_
  • The access policy realm is your whole organization, not individual stacks
  • The access policy includes the billing-metrics:read and orgs:read scopes
  • The organization is on a paid Grafana Cloud plan
  • The token has not expired or been deleted

If Test reports an unexpected error, confirm the Organization Slug matches the slug in your Grafana Cloud organization URL.

Maintenance and configuration

Fixed IP egress

If your Grafana Cloud access policy only accepts requests from approved IP addresses, select Use fixed IP egress on the CloudZero connection, then add the following addresses to the access policy's IP ranges:

  • 52.0.118.180
  • 52.0.33.111
  • 34.207.222.149
  • 34.193.111.240
  • 100.30.110.234
  • 54.85.9.231
  • 35.175.48.156
  • 100.50.61.179

For how fixed IP egress works, see Fixed IP egress.

Update credentials

You can replace the access policy token without creating a new connection.

  1. In CloudZero, go to Settings > Connections and select your Grafana connection.
  2. Select Edit.
  3. Enter the new token in Access Policy Token. Leave the field empty to keep the current token.
  4. Select Save Changes.

The Organization Slug cannot be changed after the connection is created. To connect a different organization, create a new connection.

Connection details

Tags

CloudZero ingests the labels you have set on your Grafana Cloud stacks. Labels appear with your original key names and are available for use in Dimensions. The connection also provides tags with the grafana_cz prefix:

TagDescription
grafana_cz:dimension_idID of the Grafana Cloud billing dimension
grafana_cz:is_proratedWhether Grafana Cloud prorated the charge
grafana_cz:clusterCluster that hosts the stack
grafana_cz:planPlan of the stack
grafana_cz:stack_statusStatus of the stack

Cluster, plan, and status reflect your stacks as they are when CloudZero ingests data. Costs for stacks you have since deleted appear without them.

Cloud Provider Dimensions

CloudZero maps your Grafana Cloud billing data to the following categories (called Cloud Provider Dimensions), which you can group and filter by across the platform:

DimensionExample values
AccountYour organization slug
ServiceThe Grafana Cloud billing dimension, such as Grafana Cloud Logs
RegionThe cluster that hosts the stack, or no-region when CloudZero cannot match the cost to a current stack
Resourcestack/<stack ID>, or stack/-unknown- for charges not tied to a stack

Usage data

Grafana Cloud bills each billing dimension for the whole organization. CloudZero divides each dimension's billed amount across your stacks in proportion to each stack's usage, so you can see what each stack costs. When a charge has no usage to divide by, such as a flat or prorated fee, CloudZero splits it evenly across the stacks. The total always matches the billed amount.

Grafana Cloud reports billed usage by month, so each cost line covers one monthly billing period.

ℹ️

Have questions or feedback? Reach out to your account manager.


Did this page help you?