Health Service
Provides health and status indicators for the router, including system resources and queue connectivity.
Endpoints
Get Overall Health Status
GET /health
Checks the overall health of the system, including disk, memory, and queue status.
Success Response
Returns health check results for all indicators.
{
"status": "ok",
"info": {
"storage": { "status": "up", "free": 123456789 },
"memory_heap": { "status": "up", "used": 104857600 },
"memory_rss": { "status": "up", "used": 104857600 },
"queue": {
"status": "up",
"publisher": { "connected": true },
"subscriber": { "connected": true },
"external": { "connected": true }
}
},
"error": {},
"details": {}
}
Error Responses
- 503 Service Unavailable: One or more health checks failed
Get Queue Health Status
GET /health/queue
Checks the health of the message queue services.
Success Response
Returns queue health details.
{
"status": "ok",
"info": {
"queue": {
"status": "up",
"publisher": { "connected": true },
"subscriber": { "connected": true },
"external": { "connected": true }
}
},
"error": {},
"details": {}
}
Error Responses
- 503 Service Unavailable: Queue health check failed
Get System Health Status
GET /health/system
Checks the health of system resources (disk and memory).
Success Response
Returns system health details.
{
"status": "ok",
"info": {
"storage": { "status": "up", "free": 123456789 },
"memory_heap": { "status": "up", "used": 104857600 },
"memory_rss": { "status": "up", "used": 104857600 }
},
"error": {},
"details": {}
}
Error Responses
- 503 Service Unavailable: System health check failed
Error Format
All error responses follow this format:
{
"statusCode": "ERROR_CODE",
"error": ["Description of the error"],
"requestId": "72e32108-6260-45e9-bb12-325fe3b61e42",
"path": "endpoint path",
"timestamp": "2025-11-19T16:32:57.915Z"
}
Field Descriptions
| Field | Type | Description |
|---|---|---|
| status | string | Overall health status (ok, error) |
| info | object | Health details for each indicator |
| error | object | Error details (if any indicator failed) |
| details | object | Additional details |
| publisher | object | Queue publisher connection status |
| subscriber | object | Queue subscriber connection status |
| external | object | External queue connection status |
| storage | object | Disk storage health details |
| memory_heap | object | Heap memory health details |
| memory_rss | object | RSS memory health details |
For more details, see HealthController and QueueHealthIndicator definitions.