Monitoring
Monitor coordinator health, execution throughput, and abuse-control behavior.
Base URL
Replace {COORDINATOR_URL} with your coordinator service URL.
Local Development:
http://localhost:3001/apiProduction:
https://your-coordinator-domain.com/apiHealth Check
Check coordinator status:
curl {COORDINATOR_URL}/api/healthResponse:
{
"status": "healthy",
"database": "connected",
"timestamp": 1777500000000,
"schedulesRegistered": 4
}When the database is unavailable, the coordinator responds with 503 and an unhealthy payload.
Logs
Monitor coordinator logs for:
- schedule polling
- execution run creation
- stage-level attempts (
delegate,claim,commit) - retries and exhausted runs
- schedule registration success / rejection
- rate-limit decisions
- Redis limiter connectivity and fallback events
Development:
npm run devProduction:
npm run startDatabase Monitoring
Use Drizzle Studio to inspect the coordinator database:
npm run db:studioCurrent tables:
schedules- registered schedules, recipient payloads, Merkle proofsexecution_runs- execution-run state for each scheduled payout windowexecution_attempts- stage-level attempt history
Metrics
The coordinator exports Prometheus metrics at GET /api/metrics.
By default this endpoint is protected. If METRICS_PUBLIC=false, callers must send:
Authorization: Bearer <METRICS_AUTH_TOKEN>Example:
curl {COORDINATOR_URL}/api/metrics \
-H "Authorization: Bearer <METRICS_AUTH_TOKEN>"Key metrics exposed today:
veil_scheduler_polls_totalveil_schedules_detected_due_totalveil_execution_runs_created_totalveil_execution_stage_totalveil_claim_results_totalveil_api_requests_totalveil_api_request_duration_secondsveil_api_rate_limit_decisions_totalveil_api_concurrency_limit_decisions_totalveil_api_rate_limit_backend_events_total
Rate-Limit Monitoring
If rate limiting is enabled, watch for:
- repeated
429responses onPOST /api/schedules - bursts of
limitedoutcomes inveil_api_rate_limit_decisions_total - repeated concurrency limiting on registration requests
memory-fallbackbackend events, which indicate Redis is unavailable
In dry-run mode, the coordinator logs what would have been limited without blocking the request.
Troubleshooting
Coordinator not executing schedules
- check logs for execution-stage failures
- verify database connectivity
- verify ER authority keypair loading
- verify Solana RPC connectivity
/api/metrics returns 403
- confirm
METRICS_PUBLIC=falseis intentional - send
Authorization: Bearer <METRICS_AUTH_TOKEN> - verify
METRICS_AUTH_TOKENis set on the deployed service
Database errors
- check
DATABASE_URL - verify PostgreSQL is reachable
- run migrations with
npm run db:migrate
Redis limiter errors
- confirm
RATE_LIMIT_REDIS_URLis valid - expect one slower connect if your managed Redis instance was sleeping
- if Redis is unavailable, registration falls back to in-memory limiting and read routes fail open