How do I add a new service to status.go monitoring?
Adding New Services
Step 1: Service Registration
Add your service to the monitoring configuration in status.go:
// In status.go
services := []ServiceConfig{
{
ID: "my-new-service",
Name: "My New Service",
URL: "http://my-service:8080/health",
Interval: 30 * time.Second,
Timeout: 5 * time.Second,
},
}
Step 2: Health Check Endpoint
Ensure your service exposes a health check endpoint:
// Example health check endpoint
GET /health
Response: {"status": "healthy", "timestamp": "2026-02-19T22:56:00Z"}
Step 3: Configuration Update
Add service configuration via API:
curl -X POST http://localhost:3001/api/v1/services \
-H "Content-Type: application/json" \
-d '{
"id": "my-new-service",
"name": "My New Service",
"url": "http://my-service:8080/health",
"interval": "30s",
"timeout": "5s"
}'
Step 4: Verification
# Check if service appears in status
curl http://localhost:3001/api/v1/services/status/overview
Required Service Health Endpoint
Your service must implement:
// Basic health check
{
"status": "healthy|degraded|down",
"timestamp": "2026-02-19T22:56:00Z",
"version": "1.0.0"
}