1. My Awesome App
  2. Help
  3. How do I configure service monitoring intervals?

How do I configure service monitoring intervals?

Monitoring Configuration

Configuration File Format

Create or modify config/status.yaml:

monitoring:
  interval: 30s
  timeout: 10s
  retries: 3
  
services:
  - name: "auth-service"
    url: "http://auth:8080/health"
    interval: 15s
    timeout: 5s
    
  - name: "database"
    url: "postgres://user:pass@db:5432/appgram"
    interval: 60s
    timeout: 10s

Environment Variables

# Basic configuration
MONITORING_INTERVAL=30s
MONITORING_TIMEOUT=10s
MAX_RETRIES=3

# Service-specific
AUTH_SERVICE_URL=http://auth:8080/health
DATABASE_URL=postgres://user:pass@db:5432/appgram

Runtime Configuration

Update settings without restart:

# Update via API
curl -X POST http://localhost:3001/api/v1/services/config \
  -H "Content-Type: application/json" \
  -d '{"interval": "15s", "timeout": "5s"}'

Best Practices

  • Critical services: 15-30 second intervals
  • Standard services: 60 second intervals
  • Database: 5-10 minute intervals
  • Third-party APIs: 2-5 minute intervals