> ## 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 so it can detect anomalies, compare baselines, and correlate changes across services.

## 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

<Tabs>
  <Tab title="Grafana Cloud">
    <Steps>
      <Step title="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`).
      </Step>

      <Step title="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** (e.g., `https://prometheus-prod-XX-prod-us-west-0.grafana.net/api/prom`)
        * Under **Authentication**, note the **User** field — this is your numeric instance ID (e.g., `3116090`)
      </Step>

      <Step title="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
      </Step>

      <Step title="Configure in Traversal">
        Go to **Company Knowledge > Integrations**, select **Prometheus**, and enter:

        * **Server URL**: the Prometheus query endpoint from step 2
        * **Authentication**: select **Basic Authentication**
        * **Username**: your numeric instance ID
        * **Password**: the `glc_...` access policy token

        <Info>Grafana Cloud requires basic auth — the username identifies your tenant in Grafana's multi-tenant Prometheus backend. Bearer token authentication will not work.</Info>
      </Step>
    </Steps>
  </Tab>

  <Tab title="Self-hosted Prometheus">
    <Steps>
      <Step title="Find your Prometheus URL">
        Identify the Prometheus HTTP API endpoint (e.g., `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. Do not use the Grafana dashboard URL.

        <Info>If the data source is provisioned or uses a proxy, ask your administrator for the direct Prometheus URL and credentials.</Info>
      </Step>

      <Step title="Configure in Traversal">
        Go to **Company Knowledge > Integrations**, select **Prometheus**, and enter:

        * **Server URL**: your Prometheus endpoint
        * **Authentication** (optional): basic auth credentials if your instance requires them
      </Step>
    </Steps>
  </Tab>

  <Tab title="Other cloud Prometheus">
    <Steps>
      <Step title="Get your endpoint and credentials">
        For managed Prometheus services (e.g., Amazon Managed Prometheus, 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.
      </Step>

      <Step title="Configure in Traversal">
        Go to **Company Knowledge > Integrations**, select **Prometheus**, and enter:

        * **Server URL**: the query endpoint
        * **Authentication**: select **Bearer Token** and paste your token
      </Step>
    </Steps>
  </Tab>
</Tabs>

## 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/)
