Skip to content

Comprehensive Grafana Dashboard Designs for Infrastructure

Overview

This document provides comprehensive Grafana dashboard designs for monitoring the self-hosted infrastructure on Docker. The dashboards are designed to provide visibility into system health, service performance, security posture, and resource optimization.

Available Metrics Sources

System Metrics

  • Node Exporter: CPU, memory, disk, network, filesystem metrics
  • cAdvisor: Container-level resource usage
  • Docker Engine: Container lifecycle events and metrics

Service-Specific Metrics

  • Traefik: Request rates, response times, error rates, certificate status
  • PostgreSQL (Supabase): Connection pools, query performance, database sizes
  • Gitea: Repository counts, user activity, sync status
  • AdGuard Home: DNS queries, blocked requests, performance
  • LiteLLM: API request rates, model usage, token consumption
  • n8n: Workflow executions, queue depth, error rates
  • Open WebUI: User sessions, chat interactions, response times

Application Performance Metrics

  • Prometheus: Self-monitoring metrics
  • Loki: Log ingestion rates, query performance
  • Custom exporters: Business-specific metrics

Dashboard Designs

1. Infrastructure Overview Dashboard

Purpose: High-level view of overall infrastructure health and key metrics.

Layout:

┌─────────────────────────────────────────────────────────────────┐
│                    Infrastructure Overview                       │
├─────────────┬─────────────┬─────────────┬─────────────────────┤
│ System      │ Containers  │ Services    │ Alerts              │
│ Health      │ Running     │ Status      │ Active              │
│ ■ 98%       │ 12/12       │ 11/11 ✓     │ 0 Critical         │
├─────────────┴─────────────┴─────────────┴─────────────────────┤
│                     CPU Usage (Last 6h)                         │
│ [=============================================     ] 45%        │
├─────────────────────────────────────────────────────────────────┤
│ Memory Usage         │ Disk Usage           │ Network I/O      │
│ [==========    ] 68% │ [========      ] 52% │ ↓ 125 MB/s      │
│ 10.9/16 GB          │ 520/1000 GB         │ ↑ 45 MB/s       │
├─────────────────────┴──────────────────────┴──────────────────┤
│                    Container Resource Usage                      │
│ [Stacked bar chart showing CPU/Memory per container]           │
├─────────────────────────────────────────────────────────────────┤
│ Service Response Times │ Request Rate        │ Error Rate      │
│ [Line graph]          │ [Area chart]        │ [Gauge]         │
└─────────────────────────────────────────────────────────────────┘

Key Panels:

  1. System Health Score

    {
      "title": "System Health Score",
      "type": "stat",
      "targets": [{
        "expr": "(1 - (rate(up{job=~\".*\"}[5m]) < 1)) * 100"
      }],
      "fieldConfig": {
        "defaults": {
          "unit": "percent",
          "thresholds": {
            "steps": [
              {"value": 0, "color": "red"},
              {"value": 80, "color": "yellow"},
              {"value": 95, "color": "green"}
            ]
          }
        }
      }
    }
    

  2. Container Status

    {
      "title": "Container Status",
      "type": "stat",
      "targets": [{
        "expr": "count(container_last_seen{name=~\".+\"})",
        "legendFormat": "Running"
      }]
    }
    

  3. CPU Usage Timeline

    {
      "title": "CPU Usage",
      "type": "timeseries",
      "targets": [{
        "expr": "100 - (avg(rate(node_cpu_seconds_total{mode=\"idle\"}[5m])) * 100)",
        "legendFormat": "CPU Usage %"
      }],
      "fieldConfig": {
        "defaults": {
          "unit": "percent",
          "max": 100,
          "thresholds": {
            "steps": [
              {"value": 0, "color": "green"},
              {"value": 70, "color": "yellow"},
              {"value": 90, "color": "red"}
            ]
          }
        }
      }
    }