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

# VictoriaMetrics

> Connect VictoriaMetrics 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 VictoriaMetrics data with PromQL to retrieve metrics, detect anomalies, and correlate data points with alerts and deployments, without requiring manual query construction.
</Info>

***

## Prerequisites

* A Grafana instance (Cloud or self-hosted) with a **VictoriaMetrics data source** already configured
* Admin access to create a Service Account in Grafana

<Note>
  Ewake reads VictoriaMetrics **through your Grafana data source proxy**, so you connect Grafana once rather than exposing VictoriaMetrics directly. Ewake resolves the data source automatically.
</Note>

***

## Configuration

<Steps>
  <Step title="Create a Service Account in Grafana">
    In Grafana, go to **Administration** → **Service Accounts** → click **Add service account**.

    Set the role to **Viewer**, ewake only needs read access.

    Once the account is created, click **Add service account token** → copy the token immediately.

    <Note>
      Copy the token now, you won't be able to see it again after closing the modal.
    </Note>
  </Step>

  <Step title="Get your Grafana instance URL">
    **Grafana Cloud:** Your instance URL follows the format `https://yourorg.grafana.net`.

    **Self-hosted:** Use the base URL of your Grafana instance (e.g. `https://grafana.yourcompany.com`).
  </Step>

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

    <img src="https://mintcdn.com/ewakeai/_JtmvgYGsYkliiIP/images/integrations/observability/victoriametrics/connect-modal.png?fit=max&auto=format&n=_JtmvgYGsYkliiIP&q=85&s=56e0313a92638966a125d5e3f1d741ea" alt="Connect to VictoriaMetrics modal in ewake" style={{ maxHeight: "320px", objectFit: "cover", objectPosition: "top", borderRadius: "8px" }} width="1180" height="1220" data-path="images/integrations/observability/victoriametrics/connect-modal.png" />
  </Step>

  <Step title="Enter your credentials">
    | Field           | Value                                                                          |
    | --------------- | ------------------------------------------------------------------------------ |
    | **Grafana URL** | Base URL of the Grafana instance that proxies your VictoriaMetrics data source |
    | **API Key**     | The service account token generated in Step 1                                  |
  </Step>

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

    <Check>
      VictoriaMetrics 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 VictoriaMetrics or Grafana configuration.
</Note>
