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

# Prometheus

> Connect Prometheus to give ewake access to your time-series metrics for anomaly detection and root cause analysis.

<Info>
  **What you'll get:** ewake can query your Prometheus instance using PromQL to retrieve metrics, detect anomalies, and correlate data points with alerts and deployments, without requiring manual query construction.
</Info>

***

## Prerequisites

* A Prometheus instance (self-hosted or Grafana Cloud Mimir)
* Your Prometheus endpoint URL
* A bearer token if your instance requires authentication

***

## Configuration

<Steps>
  <Step title="Get your Prometheus endpoint URL">
    **Self-hosted:** Your Prometheus HTTP API is accessible at `http://prometheus.your-domain.com:9090`.

    **Grafana Cloud (Mimir):** Go to your Grafana Cloud portal → **My Account** → **Grafana Cloud Stack** → **Prometheus details**. Copy the **Remote Read URL**.
  </Step>

  <Step title="Generate an API key (Grafana Cloud)">
    In Grafana Cloud, go to **My Account** → **Access Policies** → **Create access policy**.

    Grant it `metrics:read` scope, then generate a token and copy it immediately.

    <Note>
      For self-hosted Prometheus with no authentication, leave the API Key field empty.
    </Note>
  </Step>

  <Step title="Open the Prometheus integration in ewake">
    In your ewake dashboard, go to **Integrations** → **Prometheus** → click **Configure**.

    <img src="https://mintcdn.com/ewakeai/M1QmRrA-jDM2VkcE/images/integrations/observability/prometheus/connect-modal.png?fit=max&auto=format&n=M1QmRrA-jDM2VkcE&q=85&s=1a827a6d2cef48f4d948e37dcb805643" alt="Connect to Prometheus modal in ewake" style={{ maxHeight: "320px", objectFit: "cover", objectPosition: "top", borderRadius: "8px" }} width="940" height="341" data-path="images/integrations/observability/prometheus/connect-modal.png" />
  </Step>

  <Step title="Enter your credentials">
    | Field                   | Value                                          |
    | ----------------------- | ---------------------------------------------- |
    | **Prometheus Base URL** | Your Prometheus endpoint URL                   |
    | **API Key**             | Bearer token (leave empty if no auth required) |
  </Step>

  <Step title="Test and save">
    Click **Test Configuration** to verify the connection, then click **Save**.

    <Check>
      Prometheus is connected. Ewake can now query your metrics during investigations.
    </Check>
  </Step>
</Steps>

***

<Note>
  Ewake uses **read-only** PromQL queries. It never writes metrics or modifies your Prometheus configuration.
</Note>
