# Monitoring Dashboards {#monitoring-dashboards}


Set up monitoring dashboards for Gauzy deployments.


## Grafana Dashboards {#grafana-dashboards}



### API Overview Dashboard {#api-overview-dashboard}


| Panel               | Query                                          |
| ------------------- | ---------------------------------------------- |
| Request Rate        | `rate(http_requests_total[5m])`                |
| Response Time (P50) | `histogram_quantile(0.5, ...)`                 |
| Response Time (P99) | `histogram_quantile(0.99, ...)`                |
| Error Rate          | `rate(http_requests_total{status=~"5.."}[5m])` |
| Active Connections  | `pg_stat_activity_count`                       |


### Application Health {#application-health}


| Panel         | Metric                                     |
| ------------- | ------------------------------------------ |
| CPU Usage     | `container_cpu_usage_seconds`              |
| Memory Usage  | `container_memory_usage_bytes`             |
| Pod Count     | `kube_deployment_status_replicas`          |
| Restart Count | `kube_pod_container_status_restarts_total` |
| Redis Memory  | `redis_used_memory`                        |


### Business Metrics {#business-metrics}


| Panel              | Source                     |
| ------------------ | -------------------------- |
| Active Users       | Custom app metric          |
| Time Tracked Today | Custom app metric          |
| Active Timers      | WebSocket connection count |
| Tasks Completed    | Custom event counter       |


## Alert Rules {#alert-rules}


| Alert              | Condition           | Severity |
| ------------------ | ------------------- | -------- |
| High Error Rate    | > 5% 5xx responses  | Critical |
| High Latency       | P99 > 5s            | Warning  |
| Pod Restart        | > 3 restarts / 5min | Critical |
| High Memory        | > 90% memory usage  | Warning  |
| DB Connection Pool | > 80% connections   | Warning  |


## Dashboard Provisioning {#dashboard-provisioning}


```yaml
# kubernetes/grafana/dashboards.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: gauzy-dashboards
data:
  api-overview.json: |
    { ... }
```


## Related Pages {#related-pages}


- [Health Checks](https://sourcey-gauzy.pages.dev/observability/health-checks/index.md) — health monitoring
- [Alerting](https://sourcey-gauzy.pages.dev/observability/alerting/index.md) — alert configuration
- [Prometheus Metrics](https://sourcey-gauzy.pages.dev/observability/prometheus-metrics/index.md) — metrics
