Skip to main content

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

FieldTypeDescription
statusstringOverall health status (ok, error)
infoobjectHealth details for each indicator
errorobjectError details (if any indicator failed)
detailsobjectAdditional details
publisherobjectQueue publisher connection status
subscriberobjectQueue subscriber connection status
externalobjectExternal queue connection status
storageobjectDisk storage health details
memory_heapobjectHeap memory health details
memory_rssobjectRSS memory health details

For more details, see HealthController and QueueHealthIndicator definitions.