Перейти к основному содержимому

Health Checks & Diagnostics

Built-in health checks for monitoring application and dependency status.

Health Check Endpoint

GET /api/health

Response:

{
"status": "ok",
"info": {
"database": { "status": "up" },
"redis": { "status": "up" },
"disk": { "status": "up" },
"memory": { "status": "up" }
},
"error": {},
"details": {
"database": { "status": "up" },
"redis": { "status": "up" }
}
}

Check Types

CheckDescriptionThreshold
DatabasePostgreSQL/SQLite connectivity3s timeout
RedisRedis connectivity3s timeout
DiskAvailable disk space> 10% free
MemoryAvailable memory (RSS)< 80% used

Load Balancer Integration

Configure your load balancer to use the health endpoint:

upstream gauzy_api {
server api1:3000;
server api2:3000;
}

server {
location /api/health {
proxy_pass http://gauzy_api;
}
}

Kubernetes Probes

livenessProbe:
httpGet:
path: /api/health
port: 3000
initialDelaySeconds: 30
periodSeconds: 10

readinessProbe:
httpGet:
path: /api/health
port: 3000
initialDelaySeconds: 5
periodSeconds: 5