Skip to main content
The Hivenet Router Docker Compose stack provisions Grafana with dashboards and data sources for metrics, audit logs, and traces. The repository includes three dashboards: Grafana also includes a Tempo data source for exploring distributed traces.

Open Grafana

When you use the repository’s Docker Compose stack, Grafana is available at:
For a local deployment:
The checked-in Compose file uses:
Change the Grafana administrator password before exposing port 3000 outside a trusted environment.Prefer a VPN, private network, reverse proxy, or SSH tunnel instead of exposing Grafana directly to the internet.
Change the initial password in docker-compose.yml:
Then recreate the Grafana container:

Use an SSH tunnel

You can access Grafana without opening port 3000 publicly:
Then open:

Open a dashboard directly

Use the dashboard UID in the URL.

Router dashboard

Tenant quota dashboard

Audit dashboard

Grafana may add a human-readable dashboard name and organization query parameter to the URL after opening it.

Provisioned data sources

The repository provisions three Grafana data sources. Prometheus is the default data source. The Tempo data source is configured to:
  • correlate traces with Loki logs by trace ID
  • support node-graph visualization
  • search Loki from trace context
These hostnames resolve inside the Docker Compose network. They are not intended as public addresses.

Hivenet Router Router dashboard

The Hivenet Router Router dashboard is the main operational view. It contains filters for:
  • model
  • engine
  • peer ID
  • organization
  • machine
Use these filters to narrow every compatible panel to one model, backend type, agent, team, or host.
The current router dashboard does not include a region filter. Region is still available as a Prometheus label and can be used in custom panels or Explore queries.

Router summary

The top row shows: The routing panels use cumulative counters rather than rates. Their values represent the current Prometheus series totals, not necessarily activity within the selected Grafana time range. Use rate() or increase() in Explore when you need activity during a specific period. For example, primary requests during the last hour:

Agent routing table

The first table combines:
  • peer ID
  • model
  • engine
  • organization
  • machine
  • region and capacity labels where available
  • current health
  • last heartbeat
  • agent failures
  • backend failures
  • disconnections
Use it to answer questions such as:
  • Which agents are currently registered?
  • Which agents are unhealthy?
  • Is the problem with the agent process or its backend?
  • Has one peer repeatedly disconnected?
  • Is the expected model registered on the expected host?

Universal routing state

The Routing Table — Universal section includes:
  • success rate
  • capacity utilization
  • SRTT
  • RTTVAR
  • successful requests
  • failed requests
  • input tokens
  • output tokens
  • capacity rejections
These values come from Hivenet Router’s universal per-agent history and can apply across backend types.

Success rate

A value below your normal baseline may indicate backend errors, request incompatibility, or connection instability.

Capacity utilization

This is:
A high value means Hivenet Router has assigned most of the capacity currently represented by its routing slots. For streaming requests, the current implementation releases the agent slot when response headers arrive, while backend generation can continue. Compare this panel with engine running and waiting requests, KV-cache pressure, TTFT, and ITL when the workload is stream-heavy.

SRTT and RTTVAR

SRTT represents smoothed request time observed by Hivenet Router. RTTVAR shows how much that timing varies. A high RTTVAR can indicate unstable or bursty latency even when average latency remains acceptable.

Hardware tables

The hardware section includes two tables.

Node resources

The node table shows:
  • CPU use
  • system-memory use
  • available memory
  • total memory

GPU resources

The GPU table shows:
  • GPU utilization
  • VRAM used
  • VRAM free
  • total VRAM
  • temperature
  • power draw
One agent may produce several rows when it reports several GPUs. CPU-only agents do not produce GPU rows. The router dashboard includes time-series panels for:
  • GPU utilization
  • VRAM used
  • GPU temperature
  • GPU power draw
  • CPU usage
  • memory available
Use these panels to correlate routing or latency changes with system pressure. For example:
  • rising VRAM use may precede out-of-memory failures
  • high temperature may coincide with thermal throttling
  • falling memory availability may indicate another process competing with inference
  • sustained GPU saturation may explain queue growth
The thresholds that matter depend on the hardware and workload. Dashboard values should inform investigation rather than act as universal operating limits.

Engine metrics table

The Engine — Backend Metrics table shows the most recent engine-specific values reported by each agent. These can include:
  • KV-cache utilization
  • running requests
  • waiting requests
  • cumulative preemptions
  • average TTFT
  • P90 TTFT
  • average ITL
  • P90 ITL
  • generated tokens per second
  • prompt tokens per second
Backend support differs: A blank cell may mean the backend does not expose the metric, the metric endpoint is disabled, or the agent has not reported a value yet. The dashboard includes time-series panels for:
  • KV-cache utilization
  • running and waiting requests
  • preemption rate
  • time to first token
  • inter-token latency
  • token throughput

Preemption changes

Hivenet Router exports the backend’s latest cumulative preemption value as a gauge, despite the metric’s _total suffix. A normal rate() query assumes counter semantics and can mislead around backend restarts or resets. Use this in Explore when you need recent positive growth:
Treat any provisioned panel that applies rate() directly to this series as a dashboard limitation until its query is updated.

TTFT and ITL

The dashboard shows the per-agent average and P90 gauges supplied by Hivenet Router. For a mathematically correct fleet-wide percentile, use the histogram buckets in Prometheus rather than averaging per-agent P90 values. For example:

Tenant quota dashboard

The Hivenet Router — Tenant Quota dashboard focuses on authenticated tenant activity. Its filters are:
  • tenant ID
  • model
The dashboard includes:
  • configured RPM limit
  • configured daily token limit
  • request count
  • success rate
  • RPM rejections
  • token rejections
  • most recent request
  • time until the UTC budget reset
  • request rate compared with the RPM limit
  • token-budget utilization
  • input and output token split
  • average tokens per successful request
  • estimated budget runway
  • tokens remaining
  • request latency percentiles
  • request distribution by model

Tenant snapshot values

The first row is titled:
However, several stat panels currently query raw cumulative counters rather than using increase(...[24h]). Treat those panels as current cumulative values from the available Prometheus series, not as guaranteed 24-hour totals. The time-series panels use Grafana’s selected rate interval and respond more directly to the chosen dashboard time range.

Daily token budget

Daily token panels use:
The budget resets at midnight UTC. The dashboard can show:
  • percentage used
  • absolute tokens used
  • prompt and completion split
  • current token-consumption rate
  • estimated hours of runway
  • tokens remaining
A quota limit of 0 means unlimited. Panels that depend on a finite budget may show no value for unlimited tenants.

Current tenant-dashboard limitation

The current tenant selector is populated from:
and several limit panels use the flat quota gauges:
Tenants using only quota.per_model may therefore be missing from the selector or may not have their limits represented fully in this dashboard. Per-model quota metrics are still available in Prometheus:
Use Grafana Explore or create additional panels when per-model quota visibility is required.

Audit dashboard

The Hivenet Router Audit dashboard uses structured request records stored in Loki. It requires:
  • audit logging enabled in the router
  • the audit JSONL path mounted into Promtail
  • Promtail sending records to Loki
  • the Loki data source available in Grafana
The dashboard filters are:
  • tenant ID
  • status code
  • model
  • error code
It contains: See Audit logging for the record schema, Promtail setup, and LogQL examples.

Explore traces

The repository does not include a dedicated Tempo dashboard. Use Grafana’s Explore view and select the Tempo data source. The Docker Compose router configuration includes:
When tracing is enabled, Hivenet Router sends spans to Tempo over OTLP gRPC. From a trace, Grafana can:
  • show the span tree
  • display a node graph
  • search related Loki logs using the trace ID
Trace availability depends on the router receiving the OpenTelemetry endpoint and successfully reaching Tempo.

Provisioning files

The repository stores dashboards at:
Files:
Data sources live at:
Files:
Docker Compose mounts the complete provisioning directory:
Grafana then loads the dashboards and data sources when the container starts.

Dashboard provisioning behavior

The dashboard provider is configured with:
This means:
  • the JSON files are the durable source of truth
  • Grafana checks the directory every 30 seconds
  • provisioned dashboards cannot be deleted through the UI
  • durable dashboard changes should be made in the repository files
Do not rely on an unsaved or manually duplicated UI edit as the maintained version of a provisioned dashboard.Update the dashboard JSON and review it through the repository workflow when the change should survive recreation and deployment.

Import dashboards manually

When you are not using the repository’s Compose stack, you can import the JSON files into another Grafana instance. In Grafana:
  1. Open Dashboards.
  2. Choose New and then Import.
  3. Upload one of the dashboard JSON files.
  4. Map its data source references where prompted.
  5. Complete the import.
Import:
The target Grafana instance needs:
  • a Prometheus data source with Hivenet Router metrics
  • a Loki data source for the audit dashboard
  • a Tempo data source when trace exploration is needed
The provisioned dashboard JSON refers to data-source UIDs:
Use those UIDs or update the imported dashboard references.

Dashboard variables

The current dashboards define these variables.

Router dashboard

Tenant dashboard

Audit dashboard

Variables may remain empty until the corresponding metrics or logs exist.

Build a custom dashboard

Use Grafana Explore to test a query before adding it to a dashboard. For example, request rate by model:
Policy exhaustion by model:
P95 tenant latency:
Audit failures:
When the panel is useful:
  1. add it to a dashboard
  2. export the dashboard JSON
  3. review the resulting changes
  4. update the appropriate file under deploy/grafana/provisioning/dashboards/

Alerting

The repository provisions dashboards but does not currently provision Grafana alert rules. You can create alert rules in Grafana or manage them through Prometheus. For a version-controlled infrastructure setup, Prometheus rule files are usually easier to review, reproduce, and deploy consistently. See Prometheus metrics for example alert rules.

Troubleshooting

Grafana does not start

Check the container:
Inspect its logs:
Common causes include:
  • invalid provisioning YAML
  • unreadable mounted files
  • an unwritable Grafana data volume
  • an occupied host port 3000

Dashboards are missing

Check the mounted directory:
Confirm that it contains the dashboard JSON files and dashboard.yml. Check provisioning logs:

A data source reports an error

Test connectivity from the Grafana container. Prometheus:
Loki:
Tempo:
Inspect the corresponding service logs when a check fails.

The router dashboard has no data

Check the Prometheus target:
Query one registration metric:
If the query is empty:
  • confirm that agents are registered
  • confirm that Prometheus scrapes router:2112
  • inspect router and Prometheus logs
  • check whether the selected dashboard filters exclude all agents

Hardware panels are empty

Check whether the agent reports hardware data:
For GPU panels, check:
  • NVIDIA drivers
  • NVML availability
  • container GPU access
  • the agent process permissions
CPU-only agents do not produce GPU series.

Engine panels are empty

Check backend support and configuration:
  • SGLang needs --enable-metrics
  • llama.cpp needs --metrics
  • Ollama, Infinity, and custom engines do not currently supply engine metrics
Test the engine endpoint on the agent host:
Inspect the agent logs for scrape errors.

The tenant dashboard has no tenants

Tenant metrics appear only after authenticated or no-auth traffic creates them. Check:
A tenant using only per-model quota gauges may not appear in the current selector. Query the per-model metrics directly in Explore when necessary.

The audit dashboard is empty

Confirm that audit records exist:
Check Promtail:
Check Loki:
Query Loki through its API:

Trace search is empty

Check that the router received:
Inspect the router logs for tracing initialization or export errors. Confirm that Tempo is ready:

Dashboard edits disappear

The dashboards are provisioned from files. Make durable changes in:
then allow Grafana’s provisioning interval to reload them, or restart Grafana:

Next steps

Audit logging

Configure structured request records and query them through Loki.

Hardware metrics

Understand the GPU, CPU, and memory values shown in Grafana.

Engine metrics

Review cache, queue, TTFT, ITL, and throughput metrics by backend.