Monitoring & Observability
Health Endpoints
Section titled “Health Endpoints”HyperMesh exposes standard health check endpoints for load balancers and orchestrators.
| Endpoint | Auth | Purpose |
|---|---|---|
GET /health | Required | Full health status with version, uptime, and table count |
GET /health/live | None | Liveness probe — returns 200 if process is running |
GET /health/ready | None | Readiness probe — returns 200 when indexes are loaded |
Prometheus Metrics
Section titled “Prometheus Metrics”The /metrics endpoint exposes Prometheus-compatible metrics:
# HELP hypermesh_records_total Total records in TPI index# TYPE hypermesh_records_total gaugehypermesh_records_total 1000000
# HELP hypermesh_query_duration_seconds Query execution time# TYPE hypermesh_query_duration_seconds histogramhypermesh_query_duration_seconds_bucket{strategy="tpi",le="0.001"} 9500hypermesh_query_duration_seconds_bucket{strategy="tpi",le="0.01"} 9900
# HELP hypermesh_wal_size_bytes Current WAL file size# TYPE hypermesh_wal_size_bytes gaugehypermesh_wal_size_bytes 4194304
# HELP hypermesh_compactions_total Total compaction operations# TYPE hypermesh_compactions_total counterhypermesh_compactions_total 42Key Metrics to Monitor
Section titled “Key Metrics to Monitor”| Metric | Alert Threshold | Action |
|---|---|---|
hypermesh_wal_size_bytes | > 100 MB | Trigger manual compaction or reduce compact_threshold |
hypermesh_query_duration_seconds (p99) | > 10 ms | Check for missing indexes or oversized time windows |
hypermesh_records_total | Stagnant for > 1 hour | Check ingestion pipeline health |
hypermesh_compactions_total rate | < 1/hour during ingestion | Increase autocompact frequency |
Grafana Dashboard
Section titled “Grafana Dashboard”A pre-built Grafana dashboard is available at examples/grafana/hypermesh-dashboard.json in the repository. It includes:
- Query latency heatmap (by strategy: TPI, FMI, PSI)
- WAL size over time with compaction markers
- Records ingested per minute
- Active connections and API key usage
Structured Logging
Section titled “Structured Logging”Enable JSON-formatted logs for log aggregation systems:
export HMDB_LOG_FORMAT=jsonexport HMDB_LOG_LEVEL=infohmdb serveLog output:
{"ts":"2026-06-22T10:00:01Z","level":"info","msg":"query_complete","strategy":"tpi","duration_us":42,"records":150,"table":"NetworkFlows"}Alerting Best Practices
Section titled “Alerting Best Practices”- WAL growth — alert when WAL exceeds 50% of available disk; autocompact should prevent this
- Query latency — baseline p99 during normal load, alert at 3x baseline
- Ingestion lag — compare
records_totalgrowth rate against expected event rate - Disk usage — TPI files grow linearly with data; plan capacity based on retention TTL