Before you start. There is no database agent. A standard OpenTelemetry
Collector (the contrib distribution) scrapes the database and sends its
metrics to aiAxonIQ like any other metric. You need a Collector that can reach
the database and a license key — see
Send data with OpenTelemetry.
This is server health, not query monitoring. Nothing reads
pg_stat_statements or stores query digests, so there are no slow-query
lists, execution plans, query history or connection-pool breakdowns here. The
page lists those four as Not served by the API yet rather than
approximating them. For the time your application spends in database
calls, see Databases inside an APM project, which
is built from your application’s spans.How the page reads your metrics
Two rules decide what appears, and knowing them saves most debugging. The engine is the metric-name prefix. A metric namedpostgresql.backends
belongs to PostgreSQL, redis.memory.used to Redis. A receiver that renames its
metrics disappears from this page rather than showing up wrong.
An instance is identified by the first of these attributes that is set,
looked for on both the resource and the data point:
A metric carrying none of them is listed under the instance
unknown.
The Databases card lists database names where the engine reports them:
Configure the Collector
Add the receiver for each engine you run, then export the metrics pipeline to aiAxonIQ. The receiver configurations below were measured againstotel/opentelemetry-collector-contrib:0.151.0; replace the host names,
credentials and database names with your own.
- PostgreSQL
- MongoDB
- Redis
- ClickHouse
pg_monitor:OIQ_ENDPOINT to the base
endpoint for your deployment and OIQ_LICENSE_KEY to your license key:
Both forms carry the
/otlp prefix because nginx serves OTLP under it and
strips it before forwarding, so the receiver still sees /v1/logs. Dropping the
prefix is the most common setup mistake: the request reaches the dashboard
instead of the receiver and comes back as an HTML 404 rather than an ingest
error.
What the page shows
- Instances, Databases and Metrics reporting — how many instances, databases and distinct metrics reported in the window.
- An Instances table with host, metric and sample counts, and last seen.
- The Databases card described above.
- Engine metrics — the charts for the chosen engine, all loaded in one request.
- Reported metrics — every metric this engine’s Collector actually sent in the window, with its type, latest value and unit. A unit marked (inferred) was guessed from the metric name because the receiver sent none.
- Not served by the API yet — the four statement-level views that do not exist.
Troubleshooting
No instances reporting for an engine
No instances reporting for an engine
Nothing with that engine’s metric prefix arrived in the window. Check the
Reported metrics table: if it is empty too, the problem is upstream —
the Collector, its network path to aiAxonIQ, or the license key — not the
charts. Confirm the receiver is listed in the Collector’s
metrics
pipeline.A chart says No samples in this window
A chart says No samples in this window
There are three causes, and they need different fixes:
- The metric is off by default. Enable it in the receiver, as shown for PostgreSQL above.
- The metric is conditional. Replication lag and WAL report nothing on a standalone instance; the chart says so beneath it. That is a correct answer, not a fault.
- Nothing is arriving at all. See the previous entry.
Every instance is called unknown
Every instance is called unknown
None of the instance attributes for that engine is set on the metrics. Add
service.instance.id with a resource processor, or use a receiver version
that sets server.address.ClickHouse shows nothing while the Collector runs
ClickHouse shows nothing while the Collector runs
The page expects the three metric names
clickhouse.metric,
clickhouse.event and clickhouse.async, with a name attribute. A
sqlquery configuration that names its metrics differently reports into a
different prefix and does not appear here. Copy the configuration above.The API refuses a request that names a project
The API refuses a request that names a project
Database metrics carry no project, so the database API answers
400 to a
request that passes projectId, rather than returning the whole
organization’s data under a project’s name. Drop projectId from the
request.Next
Infrastructure and Kubernetes
Hosts, containers and the machines your databases run on.
Exploring metrics
Chart any database metric the Collector sends.