> ## Documentation Index
> Fetch the complete documentation index at: https://docs.traversal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Prometheus

> Connect Prometheus to query time-series metrics during investigations.

Connecting Prometheus lets Traversal query your metrics during investigations.

## What Traversal reads

* **Metrics**: time-series data via PromQL instant and range queries
* **Labels**: label names and values used to scope queries to the right services

## Setup

> [tab] Grafana Cloud
>
> **1. Open your Grafana instance**
>
> Log in to your Grafana Cloud account at [grafana.com/auth/sign-in](https://grafana.com/auth/sign-in). On the portal page, find your stack and click **Launch** to open the Grafana instance (URL looks like `https://<stack>.grafana.net`).
>
> **2. Find your Prometheus URL and instance ID**
>
> In your Grafana instance, go to **Connections** → **Data sources** and click the provisioned Prometheus data source (named `grafanacloud-<stack>-prom`).
>
> * Under **Connection**, copy the **Prometheus server URL** (for example, `https://prometheus-prod-XX-prod-us-west-0.grafana.net/api/prom`)
> * Under **Authentication**, note the **User** field, which is your numeric instance ID (for example, `3116090`)
>
> **3. Create an access policy token**
>
> 1. In the Grafana Cloud portal, go to **Security** → **Access Policies**
> 2. Click **Create access policy**, give it a name, and add the `metrics:read` scope for your stack
> 3. Click **Add token** and copy the generated `glc_...` token
>
> **4. Configure in Traversal**
>
> Go to **Integrations**, select **Prometheus**, and enter:
>
> * **Server URL**: the Prometheus query endpoint you copied earlier
>
> * **Authentication**: select **Basic Authentication**
>
> * **Username**: your numeric instance ID
>
> * **Password**: the `glc_...` access policy token
>
> > [!NOTE]
> >
> > Grafana Cloud requires basic auth. The username identifies your tenant in Grafana's multi-tenant Prometheus backend, so bearer token authentication doesn't work.

> [tab] Self-hosted Prometheus
>
> **1. Find your Prometheus URL**
>
> Identify the Prometheus HTTP API endpoint (for example, `http://prometheus:9090`).
>
> If your Prometheus is behind a reverse proxy or accessed through Grafana, find the direct URL in **Grafana** → **Connections** → **Data sources** → **Prometheus** under the **Connection** section. Don't use the Grafana dashboard URL.
>
> > [!NOTE]
> >
> > If the data source is provisioned or uses a proxy, ask your administrator for the direct Prometheus URL and credentials.
>
> **2. Configure in Traversal**
>
> Go to **Integrations**, select **Prometheus**, and enter:
>
> * **Server URL**: your Prometheus endpoint
> * **Authentication** (optional): basic auth credentials if your instance requires them

> [tab] Other cloud Prometheus
>
> **1. Get your endpoint and credentials**
>
> For managed Prometheus services (for example, Amazon Managed Prometheus or Coralogix), find the remote read/query endpoint and generate an API token or bearer token with read access to metrics. Refer to your provider's documentation.
>
> **2. Configure in Traversal**
>
> Go to **Integrations**, select **Prometheus**, and enter:
>
> * **Server URL**: the query endpoint
> * **Authentication**: select **Bearer Token** and paste your token

## Private network access

If the service endpoint isn't directly reachable by Traversal (as is common with self-hosted services), deploy a [Traversal Connector](https://docs.traversal.com/architecture/connector.md) in a network that can reach it. When configuring the integration, select that connector under **Network Access Needed**. The service endpoint doesn't need public internet exposure.

See [Set up the Traversal Connector](https://docs.traversal.com/setup/connector.md) for deployment and network requirements.

## More information

* [Prometheus HTTP API](https://prometheus.io/docs/prometheus/latest/querying/api/)
* [Grafana Cloud Prometheus documentation](https://grafana.com/docs/grafana-cloud/send-data/metrics/metrics-prometheus/)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.