Telemetry — MDDB API

Prometheus-compatible metrics endpoint

Prometheus metrics #

GET /metrics

Returns server telemetry in Prometheus text exposition format.

Includes HTTP request counters, latency histograms, database statistics, vector search status, and Go runtime metrics. Enabled by default (set MDDB_METRICS=false to disable).

See Telemetry documentation for Grafana dashboards and alerting rules.

Authorization: BearerAuth or APIKeyAuth or none

Responses #

Status Description Body
200 Prometheus metrics string (text/plain)
404 Metrics disabled (MDDB_METRICS=false)

Diagnose bundle without user data (admin-only) #

GET /v1/admin/diagnose

A tar.gz to attach to an issue (OPS-025), saved by mddb-cli diagnose. MANIFEST.json comes first and lists every file with its size, SHA-256 and the redaction applied. The default bundle holds build.json, config.json (configuration through the allowlist: secrets set/unset, paths and hosts set/unset, URLs scheme only, listen addresses port only, host lists counted), env.json, stats.json, storage.json, vector-stats.json, indexing.json, metrics.prom, query-shape.json, errors.json (error class and file:line, no messages) and, with the audit log on, audit-summary.json (action × result counts). It never carries document content, metadata values, document IDs, query text, vectors, keys, tokens, headers, actors, IP addresses or paths; collection names are c_ plus 8 hex digits of their SHA-256 unless keepNames=true. Read-only: works on a read-only instance and on a replication follower. Admin JWT required when auth is on. See docs/TELEMETRY.md, "Diagnose bundle".

Authorization: BearerAuth or APIKeyAuth

Parameters #

Name In Type Description
profiles query boolean Add runtime.json (goroutine count, heap and GC counters) Default false.
integrity query boolean Add integrity.json — bbolt's consistency check of every database file; slow on a large database Default false.
keepNames query boolean Keep collection names instead of hashing them Default false.

Responses #

Status Description Body
200 The bundle string (binary) (application/gzip)
401 No credentials (auth enabled)
403 Not an admin
405 Method other than GET