Skip to content

Latest commit

 

History

History
56 lines (42 loc) · 1.19 KB

File metadata and controls

56 lines (42 loc) · 1.19 KB

Health Check Quick Start

Testing Locally

Start the server:

npm run dev

Test basic health check:

curl http://localhost:3001/api/health

Test detailed health check:

curl http://localhost:3001/api/health/detailed

Run Tests

npm test -- health.test.js

Production Monitoring

Using curl

# Basic check
curl https://your-domain.com/api/health

# Detailed check with formatted output
curl -s https://your-domain.com/api/health/detailed | jq

Using monitoring tools

  • Uptime Robot: Monitor /api/health endpoint
  • Datadog: Use HTTP check on /api/health/detailed
  • New Relic: Configure synthetic monitoring
  • Prometheus: Scrape /metrics endpoint (already configured)

Response Codes

  • 200: System healthy or degraded (still operational)
  • 503: System unhealthy (critical components down)

What Gets Checked

✅ PostgreSQL database connectivity and response time
✅ Redis cache connectivity and response time
✅ Stellar Horizon API connectivity and response time
✅ System memory usage
✅ Disk space (basic check, install check-disk-space for details)
✅ Overall response time
✅ Process uptime