Infrastructure¶
The Infrastructure page provides a monitoring dashboard for MAGK platform services. It displays service health status, resource usage, and links to Prometheus metrics and Grafana dashboards for detailed observability.
Service Health¶
The service health panel shows the current status of all platform services.
| Column | Description |
|---|---|
| Service | Service name |
| Status | Healthy, Degraded, or Down |
| Uptime | Time since the last restart |
| CPU | Current CPU usage percentage |
| Memory | Current memory usage (MB / limit) |
| Version | Running service version |
Status Indicators¶
| Status | Description |
|---|---|
| 🟢 Healthy | Service is running and passing health checks |
| 🟡 Degraded | Service is running but health checks are intermittent or slow |
| 🔴 Down | Service is not responding to health checks |
Monitored Services¶
| Service | Health Check |
|---|---|
| Web | HTTP GET on the application port |
| TAK Service | TCP connection check on CoT ports |
| WebSocket Gateway | WebSocket connection check |
| PostgreSQL | pg_isready connection check |
| RabbitMQ | Management API health endpoint |
| MediaMTX | HTTP API status endpoint |
| Nginx | HTTP GET on the proxy port |
| Traefik | Dashboard API health endpoint |
| Prometheus | HTTP GET on /-/healthy |
| Grafana | HTTP GET on /api/health |
Prometheus Metrics¶
MAGK services expose Prometheus-compatible metrics endpoints. The Infrastructure page provides a summary of key metrics and a link to the full Prometheus UI.
Key Metrics¶
| Metric | Description |
|---|---|
| Active Connections | Current WebSocket and TAK client connections |
| Request Rate | HTTP requests per second across all services |
| Error Rate | HTTP 5xx responses per second |
| CoT Throughput | CoT messages processed per second |
| Queue Depth | RabbitMQ message queue depth |
| Database Connections | Active PostgreSQL connection pool usage |
Accessing Prometheus¶
Prometheus is available at the configured port (see PROMETHEUS_PORT in the Configuration Reference). The Infrastructure page includes a direct link to the Prometheus query UI.
Grafana Dashboards¶
Grafana provides pre-configured dashboards for detailed monitoring and historical analysis.
Available Dashboards¶
| Dashboard | Description |
|---|---|
| Platform Overview | High-level service health, request rates, error rates |
| TAK Service | CoT message throughput, client connections, protocol breakdown |
| Database | Query performance, connection pool, table sizes |
| RabbitMQ | Queue depths, message rates, consumer counts |
| Infrastructure | Container CPU, memory, network, and disk I/O |
Accessing Grafana¶
Grafana is available at the configured port (see GRAFANA_PORT in the Configuration Reference). The default admin password is set by the GRAFANA_ADMIN_PASSWORD environment variable.
The Infrastructure page includes a direct link to the Grafana dashboard home.
Resource Usage¶
The resource usage panel displays current container resource consumption.
| Metric | Description |
|---|---|
| CPU | Per-service CPU usage relative to configured limits |
| Memory | Per-service memory usage relative to configured limits |
| Network | Inbound and outbound network traffic per service |
| Disk | Database storage usage and log volume sizes |
Resource limits are configured in the Docker Compose files. See the Configuration Reference for details on resource limit settings.
Alerts¶
When Prometheus detects a metric threshold breach, alerts appear in the Infrastructure page header. Common alert conditions:
| Alert | Condition |
|---|---|
| Service Down | A service fails health checks for more than 60 seconds |
| High Error Rate | HTTP 5xx rate exceeds 5% of total requests |
| High Memory | A service exceeds 90% of its memory limit |
| Queue Backlog | RabbitMQ queue depth exceeds configured threshold |
| Database Connections | Connection pool usage exceeds 80% |
AlertManager handles alert routing and notification delivery. Configure alert notification channels (email, webhook) in the Grafana alerting settings.