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

# Grafana and Prometheus clients

> Use aiAxonIQ as a Prometheus datasource in Grafana with no adapter — and the PromQL limits you must know before relying on it.

aiAxonIQ exposes a **Prometheus-compatible query API**, so Grafana and other
Prometheus clients can read your metrics directly. There is no exporter, bridge
or adapter to run.

This is the answer to "we already have Grafana dashboards and we are not
rebuilding them."

<Info>
  **Before you start.** You need metrics in aiAxonIQ and a bearer token for the
  API. See [Authentication](/get-started/authentication).
</Info>

## Supported endpoints

| Endpoint                          | Purpose                                 |
| :-------------------------------- | :-------------------------------------- |
| `GET /api/v1/query`               | Instant query                           |
| `GET /api/v1/query_range`         | Range query — what a Grafana panel uses |
| `GET /api/v1/labels`              | List label names                        |
| `GET /api/v1/label/{name}/values` | List a label's values                   |
| `GET /api/v1/metadata`            | Metric metadata                         |

That is the subset Grafana needs to drive a dashboard and populate its query
builder's dropdowns.

## Configure the datasource

<Steps>
  <Step title="Add a Prometheus datasource in Grafana">
    Set the URL to your aiAxonIQ API origin. It is the same host you sign in to.
  </Step>

  <Step title="Add the credential as a custom HTTP header">
    Under **Custom HTTP Headers**, add:

    ```text theme={null}
    Authorization: Bearer <your-token>
    ```

    Authentication is the standard bearer token used by the rest of the API —
    **not** a license key. License keys are for sending data; sessions are for
    reading it. See [Authentication](/get-started/authentication).
  </Step>

  <Step title="Save and test">
    Then build a panel with a metric name and confirm data appears.
  </Step>
</Steps>

## The limits — read this before relying on it

<Warning>
  **This is a simplified PromQL subset, not PromQL.** The supported shapes are:

  ```text theme={null}
  metric_name
  metric_name{service_name="checkout"}
  avg(metric_name{service_name="checkout"})
  ```

  Aggregations `avg`, `sum`, `max`, `min` and `count` are supported.

  **Rate functions are accepted and treated as an average.** `rate(metric[5m])`
  parses, runs, and returns an average rather than a per-second rate — so it
  returns a *plausible number that is not a rate*.

  This is the single most important thing on this page. A copied Grafana
  dashboard full of `rate()` expressions will render, will not error, and will
  show wrong values. Verify every panel against the same data in aiAxonIQ
  before trusting a migrated dashboard.
</Warning>

Other consequences of the subset worth knowing:

* **No binary operators between series** — you cannot divide one metric by
  another to compute a ratio.
* **No `by` or `without` grouping** on aggregations.
* **No sub-queries, no `histogram_quantile`, no recording rules.**
* **Only equality label matchers.** Regular-expression matchers are not part of
  the subset.

## Metric names

Metric names are matched in both common shapes, so a query written against a
Prometheus-style name will match telemetry stored under its OpenTelemetry
dotted equivalent and the reverse:

```text theme={null}
http_requests_total      ↔      http.requests.total
```

This is what lets an existing Prometheus dashboard find data that arrived over
OTLP.

## When to use this, and when not to

| Use it for                                             | Use aiAxonIQ dashboards for                |
| :----------------------------------------------------- | :----------------------------------------- |
| Existing Grafana dashboards you do not want to rebuild | Anything involving logs or traces          |
| One pane of glass across several systems               | Ratios, quantiles and grouped aggregations |
| Teams already fluent in Grafana                        | Anything the PromQL subset cannot express  |

<Note>
  **A mixed setup is entirely reasonable.** Keep your Grafana dashboards where
  they are, and use aiAxonIQ for the investigation surfaces — logs, traces, the
  service map and the AI features — that Grafana was never going to serve from
  a Prometheus datasource anyway.
</Note>

## Other Prometheus clients

Anything speaking the Prometheus HTTP API can read from these endpoints under
the same limits. The rate-function caveat applies equally: a client that
assumes full PromQL will get answers rather than errors.

## The other direction

To *send* metrics from an existing Prometheus server into aiAxonIQ, use remote
write — a configuration change on one side and nothing on your services. See
[Prometheus remote-write](/send-data/prometheus).

## Next

<CardGroup cols={3}>
  <Card title="Prometheus remote-write" icon="chart-line" href="/send-data/prometheus">
    Getting metrics in.
  </Card>

  <Card title="Exploring metrics" icon="chart-simple" href="/guides/metrics/overview">
    The native metrics surface.
  </Card>

  <Card title="API reference" icon="code" href="/api-reference/introduction">
    The full API, including these endpoints.
  </Card>
</CardGroup>
