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

# Grafana

> Connect Grafana to Myrmex over its API — create a service account token and add the integration.

import { Note, Steps, Step, CardGroup, Card, Tip } from '@mintlify/components';

Connect your **Grafana** instance so Myrmex can check its health, inspect dashboards, and read metrics. Myrmex reaches Grafana over its **HTTP API** through a [Collector](/documentation/agent-endpoint-security/collector-mode) on your network. Every request runs **live, on demand** — Myrmex returns only what you ask for and copies or stores nothing from Grafana on its side. Credentials are resolved on your side and never pass through the model.

## What Myrmex Can Do

<CardGroup cols={2}>
  <Card title="Check health" icon="heart-pulse">
    Read Grafana's health and status to confirm the instance is up.
  </Card>

  <Card title="Inspect dashboards" icon="table-columns">
    List and inspect dashboards live to see what is being monitored.
  </Card>

  <Card title="Read metrics" icon="chart-line">
    Pull metrics through the API on demand and return only what you asked for.
  </Card>

  <Card title="Review data sources" icon="database">
    List configured data sources to understand where the data comes from.
  </Card>
</CardGroup>

## Before You Start

* A **Collector** that can reach Grafana over HTTP or HTTPS (default port `3000`). See [Collector mode](/documentation/agent-endpoint-security/collector-mode).
* A **service account** (or API key) with at least the **Viewer** role.

## Step 1 — Create the Credential in Grafana

<Steps>
  <Step title="Create a service account">
    In Grafana, go to **Administration → Users and access → Service accounts** and add a service account with the **Viewer** role — enough for health, dashboards, and metrics.
  </Step>

  <Step title="Add a token">
    On the service account, click **Add service account token**, set an optional expiry, and copy the token. Myrmex sends it as a Bearer token.
  </Step>
</Steps>

<Tip>
  Use a service account with the Viewer role for read-only monitoring. Grant a higher role only if you later need Myrmex to change Grafana.
</Tip>

## Step 2 — Add the Integration in Myrmex

From the **Directory**, choose **Add Integration → Grafana**, then fill in:

| Field                     | Description                                                                                  |
| ------------------------- | -------------------------------------------------------------------------------------------- |
| **Name**                  | A unique name for this Grafana instance.                                                     |
| **Description**           | Optional note to identify the instance.                                                      |
| **API Token**             | The service account token created in Step 1.                                                 |
| **URL**                   | Grafana host or IP the Collector can reach.                                                  |
| **Protocol**              | `http` or `https`.                                                                           |
| **Port**                  | The Grafana port (default `3000`).                                                           |
| **Collector**             | The [Collector](/documentation/agent-endpoint-security/collector-mode) that reaches Grafana. |
| **Authentication Method** | `bearer` (the service account token).                                                        |

## Connect

Click **Connect** to validate the API connection and finish. Grafana then appears under **Environment → Integrations**, and you can ask about it in the Workspace or through the [Integration Specialist agent](/documentation/multi-agent-system/integration-specialist-agent).

<Note>
  Behind a reverse proxy, Grafana may serve on `443` under a sub-path. Point the URL and Port at the address the Collector can actually reach.
</Note>
