Database metrics
PandaStack exposes two distinct views of a running database: engine metrics (connections, queries per second, cache hit ratio) sourced from Managed Prometheus, and a live pod snapshot (phase, CPU, memory, restarts) from the Kubernetes cluster. Both are read live through worker-v3.
Engine metrics (paid)
Section titled “Engine metrics (paid)”Database engine metrics are a paid feature, sourced from KubeBlocks Managed Prometheus via the postgres / mysqld exporters. They describe how the database engine itself is behaving.
Summary
Section titled “Summary”GET /v1/databases/:id/engine-metrics
Returns DatabaseEngineMetricsSummary:
| Field | Type | Notes |
|---|---|---|
range | enum | The time range (1h, 24h, 7d, 30d) |
enabled | boolean | Whether metrics are available/enabled |
engine | string | postgresql or mysql |
up | boolean (nullable) | Whether the engine exporter reports the DB up |
connections | number (nullable) | Current active connections |
maxConnections | number (nullable) | Configured connection ceiling |
connectionsPct | number (nullable) | Connections as a percentage (0–100) of max |
qps | number (nullable) | Queries / transactions per second |
cacheHitPct | number (nullable) | Cache hit ratio, 0–100 |
All numeric fields are nullable — the UI shows - when no sample has been reported.
{ "success": true, "data": { "range": "24h", "enabled": true, "engine": "postgresql", "up": true, "connections": 12, "maxConnections": 300, "connectionsPct": 4, "qps": 87.4, "cacheHitPct": 99.1 }}Time series
Section titled “Time series”GET /v1/databases/:id/engine-metrics/timeseries
Returns DatabaseEngineMetricsTimeseries — a series of points for charting connections, QPS, and cache hit ratio over the window:
| Field | Type | Notes |
|---|---|---|
range | enum | 1h / 24h / 7d / 30d |
enabled | boolean | Whether metrics are available |
engine | string | postgresql or mysql |
points | array | See point shape below |
Each DatabaseEngineMetricsPoint:
| Field | Type | Notes |
|---|---|---|
t | string | ISO bucket timestamp |
connections | number (nullable) | Connections at that bucket |
qps | number (nullable) | QPS at that bucket |
cacheHitPct | number (nullable) | Cache hit ratio at that bucket |
A null point means no sample was taken in that bucket, so the chart draws a gap rather than a fabricated value.
Ranges
Section titled “Ranges”| Range | Window |
|---|---|
1h | Last hour |
24h | Last 24 hours |
7d | Last 7 days |
30d | Last 30 days |
Live pod snapshot
Section titled “Live pod snapshot”Separate from engine metrics, PandaStack surfaces a live pod snapshot of the database’s Kubernetes workload, sourced through worker-v3 (/internal/db/metrics). This is DatabaseMetrics:
| Field | Type | Notes |
|---|---|---|
available | boolean | Whether a live snapshot was obtained |
phase | string (nullable) | Pod phase, e.g. Running, Pending |
ready | boolean | Whether the pod is ready |
restarts | number | Container restart count |
startedAt | string (nullable) | When the pod started |
cpuMilli | number (nullable) | Current total CPU in millicores |
memoryMiB | number (nullable) | Current total memory in MiB |
containers | array | Per-container CPU/memory |
Each DatabaseContainerMetric: name, cpuMilli, memoryMiB.
{ "success": true, "data": { "available": true, "phase": "Running", "ready": true, "restarts": 0, "startedAt": "2026-07-14T02:00:00.000Z", "cpuMilli": 45, "memoryMiB": 312, "containers": [ { "name": "postgresql", "cpuMilli": 40, "memoryMiB": 300 }, { "name": "metrics-exporter", "cpuMilli": 5, "memoryMiB": 12 } ] }}Related
Section titled “Related”- Databases overview
- Backups & restore — also read live via worker-v3.
- Tiers & scaling — connection limits by plan.
- Plans & limits — analytics/metrics as paid features.