Overview
Weaver provides multiple health check endpoints to monitor service availability and system status. These endpoints are essential for load balancers, orchestration systems, and monitoring tools.Health Endpoint
Response Fields
Always returns
"ok" when the service is runningService uptime duration (e.g.,
"2h15m30s")Example Request
Example Response
Ready Endpoint
Response Status Codes
200 OK- Service is ready to accept requests503 Service Unavailable- Service is not ready (starting up or failing health checks)
Response Fields
Either
"ready" or "not ready"Service uptime duration (e.g.,
"2h15m30s")Map of health check results, each containing:
name(string) - Name of the health checkstatus(string) - Either"ok"or"fail"message(string) - Optional status messagetimestamp(string) - ISO 8601 timestamp of the check
Example: Service Ready
Example: Service Not Ready
Admin Status Endpoint
Response Fields
Service uptime duration
Whether the service is ready to accept requests
Additional system metrics provided by the agent loop (memory usage, active sessions, queue depth, etc.)
Example Request
Example Response
Admin Service Endpoint
systemctl status weaver and returns the output.
Response Fields
Raw output from
systemctl status weaver commandError message if the command failed
Example Request
Example Response
Admin Logs Endpoint
journalctl -u weaver -n 100 --no-pager to retrieve the last 100 log entries.
Response Fields
Raw output from
journalctl commandError message if the command failed
Example Request
Example Response
Integration with Orchestration
Kubernetes Liveness Probe
Kubernetes Readiness Probe
Docker Compose Health Check
Implementation Details
The health endpoints are implemented in/home/daytona/workspace/source/pkg/health/server.go and provide:
/healthat line 233 - Basic liveness check/readyat line 246 - Readiness check with health validations/admin/statusat line 136 - Detailed system metrics/admin/serviceat line 147 - Systemd service status/admin/logsat line 159 - Recent service logs
Registering Custom Health Checks
Health checks can be registered programmatically using theRegisterCheck method:
/ready endpoint response.