Skip to content

Monitoring

HELIX includes health monitoring tools to ensure your services are running correctly and to alert you when issues arise.

Health Checks

Each Docker service has a built-in health check:

ServiceHealth CheckInterval
PostgreSQLpg_isready10s
Redisredis-cli ping10s
BackendGET /api/health30s
FrontendGET /30s
GatewayWebSocket connectivity test30s

Docker automatically restarts unhealthy containers based on these checks.

Service Status

Via CLI

bash
# Check all service status
helix status

# Example output:
# Service          Status     Health
# ─────────────────────────────────────
# helix-db         running    healthy
# helix-redis      running    healthy
# helix-gateway    running    healthy
# helix-backend    running    healthy
# helix-frontend   running    healthy
# helix-caddy      running    healthy

Via Docker

bash
# Container status with health
docker compose ps

# Detailed health info for a service
docker inspect --format='{{json .State.Health}}' helix-backend

Via API

bash
# Backend health endpoint
curl https://helix.example.com/api/health

Logs

View Logs

bash
# All services
helix logs

# Specific service
helix logs backend
helix logs gateway
helix logs frontend

# Or via Docker
docker compose logs -f backend
docker compose logs -f gateway --tail=100

Log Locations

ServiceLog Access
Backenddocker compose logs backend
Frontenddocker compose logs frontend
Gatewaydocker compose logs gateway
PostgreSQLdocker compose logs db
Redisdocker compose logs redis
Caddydocker compose logs caddy
Systemdjournalctl -u helix-mission-control

Log Levels

Set the log level in .env:

bash
LOG_LEVEL=info    # Options: debug, info, warning, error

Use debug for troubleshooting, info for normal operation.

Health Check Script

HELIX includes a comprehensive health check script:

bash
bash scripts/health-check.sh

This script checks:

  1. Docker — is Docker running?
  2. Containers — are all containers up and healthy?
  3. Database — can we connect and query?
  4. Redis — is Redis responding?
  5. Backend API — does /api/health return 200?
  6. Frontend — is the web UI accessible?
  7. Gateway — is the WebSocket connection established?
  8. Disk space — is there sufficient disk remaining?
  9. Memory — is memory usage acceptable?

Automated Health Monitoring

Set up periodic health checks with alerts:

bash
bash scripts/setup-health-cron.sh

This creates a cron job that runs the health check every 5 minutes and sends Telegram alerts if any service is unhealthy.

Auto-Restart

HELIX services are configured with Docker restart policies:

yaml
restart: unless-stopped

If a container crashes, Docker automatically restarts it. Combined with health checks, this provides self-healing for transient failures.

The systemd service ensures HELIX starts on server boot:

bash
sudo systemctl enable helix-mission-control

Monitoring Checklist

For production deployments, regularly check:

  • [ ] All containers show healthy status
  • [ ] Gateway shows Connected in the dashboard
  • [ ] Disk space is above 20% free
  • [ ] Backup cron is running (check latest backup timestamp)
  • [ ] No error-level entries in recent logs
  • [ ] SSL certificate is valid and not expiring soon

Built by HelixNode