Monitoring components
Health checks
Infrahub provides built-in health check endpoints: API server health:Container health
Docker Compose includes built-in health checks:Metrics collection
Prometheus metrics
Enable OpenTelemetry metrics export:docker-compose.override.yml
Key metrics to monitor
API server metrics:- Request rate (requests/second)
- Response time (p50, p95, p99)
- Error rate (4xx, 5xx responses)
- Active connections
- Worker utilization
- Query execution time
- Transaction rate
- Cache hit ratio
- Connection pool usage
- Page cache usage
- Heap memory usage
- Active tasks
- Task queue depth
- Task failure rate
- Task execution time
- Worker concurrency
- CPU usage
- Memory usage
- Disk I/O
- Network throughput
- Disk space usage
Neo4j metrics
Query Neo4j metrics:docker-compose.override.yml
RabbitMQ metrics
Access RabbitMQ management interface:infrahub / infrahub
Export Prometheus metrics:
docker-compose.override.yml
prometheus.yml
Redis metrics
Query Redis info:docker-compose.override.yml
Logging
Log levels
Configure log verbosity:Centralized logging
Aggregate logs using Loki, Elasticsearch, or CloudWatch:Structured logging
Infrahub logs are JSON-formatted for easy parsing:Log retention
Configure Docker log rotation:docker-compose.override.yml
Distributed tracing
Enable OpenTelemetry tracing:docker-compose.override.yml
Alerting
Prometheus alerts
Define alerts for critical conditions:alerts.yml
Alert notifications
Configure Alertmanager:alertmanager.yml
Dashboards
Grafana setup
Deploy Grafana:docker-compose.override.yml
Sample dashboard panels
API request rate:Performance monitoring
Query performance
Enable query logging:docker-compose.override.yml
Database profiling
Profile Neo4j queries:Resource utilization
Monitor container resource usage:Troubleshooting
Common issues
High memory usage:Related resources
- Configuration - Configure monitoring settings
- Architecture - Understand system components
- Backup and restore - Backup monitoring data
- Upgrade - Monitor upgrades
- Grafana - Dashboarding and visualization
- Prometheus - Metrics collection
- Jaeger - Distributed tracing