XTDB provides prebuilt Grafana dashboards for monitoring. We assume you already have a Grafana instance running with Prometheus configured to scrape your XTDB cluster or nodes (e.g. via Kubernetes).
If so, you can import the dashboards from the public-dashboards/ directory into Grafana:
-
Navigate to Dashboards → New → New dashboard.
-
Click Import dashboard.
-
Under Upload dashboard JSON file, upload the desired file from
public-dashboards/.-
Select your Prometheus data source.
-
Click Import.
-
XTDB provides two dashboards:
-
XTDB Cluster Monitoring – an overview of cluster health and performance.
-
XTDB Node Debugging – detailed insights into individual node behavior.
For local development, a monitoring stack can be started via Docker Compose. This setup runs:
-
Prometheus – metrics collection
-
Grafana – visualization, preloaded with dashboards and a Prometheus data source
-
Tempo – distributed tracing for OpenTelemetry traces
Grafana is preconfigured to:
-
Use Prometheus as the default data source
-
Include Tempo as a tracing data source
-
Automatically load dashboards from
monitoring/public-dashboards/
Prometheus is configured to scrape metrics from localhost:8081.
This assumes the monitored service:
-
Exposes metrics at
:8081/metrics -
Is reachable from inside the Prometheus container at:
-
172.17.0.1:8081
-
Tempo is configured to:
-
Accept OTLP traces on port
4317(gRPC) and4318(HTTP) -
Store traces locally for 48 hours
-
Expose the Tempo API on port
3200
Start the stack with:
docker-compose up -dIf you then go to http://localhost:3000/dashboards - you can log in (admin/admin) and work on/use the dashboards.
To view traces, use Grafana’s Explore view with the Tempo data source at http://localhost:3000/explore.
To enable OpenTelemetry tracing in your XTDB node, configure it under the tracer section:
(require '[xtdb.node :as xtn])
(def node
(xtn/start-node
{:tracer {:enabled? true
:endpoint "http://localhost:4318/v1/traces"
:service-name "xtdb-dev"}}))Or in YAML:
tracer:
enabled: true
endpoint: "http://localhost:4318/v1/traces"
serviceName: "xtdb-dev"
queryTracing: true
transactionTracing: trueConfiguration options:
-
enabled?(boolean) – Enable OpenTelemetry tracing. Default:false -
endpoint(string) – OTLP HTTP endpoint for sending traces. Default:"http://localhost:4318/v1/traces" -
service-name(string) – Service name for traces. Default:"xtdb" -
query-tracing?(boolean) – Enable tracing for queries. Default:true -
transaction-tracing?(boolean) – Enable tracing for transactions. Default:true
Traces will be sent to Tempo and can be viewed in Grafana’s Explore view.
When updating or creating dashboards, export them to both the developer and public dashboards directories.
-
For dev-dashboards:
-
Click Share.
-
Open the Export tab.
-
Click Save to file.
-
-
For public-dashboards:
-
Click Share.
-
Open the Export tab.
-
Select Export for sharing externally.
-
Click Save to file.
-
Replace the existing files in the relevant directories with your updated versions.
To scrape multiple XTDB nodes or services:
-
Ensure each node exposes its
/metricsendpoint on a discoverable port. -
Update
prometheus.ymlwith either static targets or service discovery.
Example (prometheus.yml):
scrape_configs:
- job_name: 'xtdb-nodes'
static_configs:
- targets: ['172.17.0.1:8081', '172.17.0.1:8082']