Before you start. You need metrics in aiAxonIQ and a bearer token for the
API. See Authentication.
Supported endpoints
POST is accepted on /api/v1/query and /api/v1/query_range as well, which is
what Grafana uses for a long expression.
That is the subset Grafana needs to drive a dashboard and populate its query
builder’s dropdowns.
These are the only routes that do not need a
tenantId. Everywhere else in
the API a tenant-scoped request without one is a 401 — but Prometheus has no
concept of a tenant and Grafana cannot be made to send one, so these routes take
the organization from your session alone. See
API reference.Configure the datasource
1
Add a Prometheus datasource in Grafana
Set the URL to your aiAxonIQ API origin. It is the same host you sign in to.
2
Add the credential as a custom HTTP header
Under Custom HTTP Headers, add: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.
3
Save and test
Then build a panel with a metric name and confirm data appears.
The limits — read this before relying on it
Everything else the subset cannot express is refused with a400 and a message
naming what was unsupported, rather than answered with something plausible:
- No nested expressions.
sum(rate(m[5m]))is a400. It used to be read as a metric name spelledsum(rate(m[5m])), match nothing, and return an empty series — a blank panel with no error on it. - No binary or set operators between series — no dividing one metric by
another to compute a ratio, and no
and/or/unless. byis supported, one label at a time;without,on,ignoring,group_leftandgroup_rightare not. See Grouping below.- No sub-queries, no
histogram_quantile, no recording rules. - Only equality label matchers.
!=,=~and!~are refused.
Grouping
by groups the result by one of the five matchable labels, in either the prefix
or the suffix spelling:
- The default grouping is
service_name, not “collapse to one series”. In PromQLsum(x)returns a single series; here it returns one per service, and has since this datasource existed. Every panel built against it is drawn that way, so changing the default would silently redraw all of them. - To get PromQL’s collapse, name no label:
sum by () (metric_name)returns exactly one series for the whole account, published with no grouping label.
sum by (service_name, host_name) (x) is a 400;
without is too, because it needs a series’ full label set, which a
column-shaped store does not have.
You do not need Grafana to write one. The product has a PromQL console at
Metrics → Query, which runs against the same endpoints with the same
subset, lists what is and is not supported beside the box, and completes metric
names as you type.
Metric names
An underscored Prometheus-style name also matches the dotted OpenTelemetry spelling of the same metric, so an existing Prometheus dashboard finds data that arrived over OTLP:The mapping runs one way. Underscores are expanded to dots; dots are not
contracted to underscores. A query written as
http.requests.total matches only
that exact spelling, so where you have a choice, write the underscored form.When to use this, and when not to
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.
Other Prometheus clients
Anything speaking the Prometheus HTTP API can read from these endpoints under the same limits. The rate-function caveat applies equally — that is the one construct that returns an answer instead of an error, so it is the one a client assuming full PromQL will be misled by.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.Next
Prometheus remote-write
Getting metrics in.
Exploring metrics
The native metrics surface.
API reference
The full API, including these endpoints.