Health Check
Health Check Endpoint
The Health Check endpoint offers a clear overview of Sophra’s core service health through a single API call. It provides detailed operational status and performance metrics for all critical system components. The Health Check endpoint offers a comprehensive overview of the health of Sophra’s core services through a unified API call. This endpoint is designed to provide users with clear insights into the operational status and performance metrics of all critical system components.
When accessed, it returns detailed information that allows developers and system administrators to quickly assess the overall functionality and reliability of the system. Key performance indicators, such as response times, error rates, and resource utilization, are included in the response, enabling users to identify potential issues before they escalate.
Additionally, the Health Check endpoint can serve as an essential tool for monitoring system health over time, helping teams maintain optimal performance and ensure high availability of services. By leveraging this endpoint, organizations can enhance their operational efficiency and provide a better experience for their users.
Request
GET /health
Response
{
"success": true,
"data": {
"timestamp": "2024-03-20T10:30:00.000Z",
"services": {
"elasticsearch": {
"operational": true,
"latency": 123,
"metrics": {
"cluster": {
"status": "green",
"nodes": 3,
"activePrimaryShards": 5
},
"indices": {
"total": 10,
"healthy": 10
},
"performance": {
"queryLatency": 45,
"cpuUsage": 0.75
}
}
},
"postgres": {
"operational": true,
"latency": 85,
"metrics": {
"connections": {
"active": 12,
"idle": 4
},
"performance": {
"queryLatency": 30,
"cacheHitRatio": 0.95
}
}
},
"redis": {
"operational": true,
"latency": 15,
"metrics": {
"memory": {
"used": "1.2gb",
"fragmentationRatio": 1.3
},
"performance": {
"opsPerSecond": 1500
}
}
}
},
"overall": true
},
"meta": {
"took": 223
}
}
Response
Successful response
The response is of type any
.