Metrics And Health
Purpose: validate service availability and inspect high-level ingestion buffer state.
Preconditions
- JsonLog service is reachable.
- For query storage metrics, use authenticated
/query/stats.
API/Script Flow
- Liveness check:
GET /healthshould return{"status":"ok"}.
- Write-path stats:
GET /statsreturns active account buffer metrics.
- Account storage stats:
GET /query/statswith Bearer auth returns uploaded file aggregates.
HTTP/curl Flow
JSONLOG_BASE_URL="http://localhost:3002"
ACCESS_TOKEN="<account_scoped_token>"
curl -sS "${JSONLOG_BASE_URL}/health"
curl -sS "${JSONLOG_BASE_URL}/stats"
curl -sS "${JSONLOG_BASE_URL}/query/stats" \
-H "authorization: Bearer ${ACCESS_TOKEN}"
Validation
/healthreturns HTTP200and status payload./statsreturns HTTP200with write-path statistics object./query/statsreturns HTTP401without auth and200with valid auth.