{
  "dashboard": {
    "title": "Besu Network Dashboard",
    "tags": ["besu", "blockchain"],
    "timezone": "browser",
    "schemaVersion": 16,
    "version": 0,
    "refresh": "30s",
    "panels": [
      {
        "id": 1,
        "title": "Block Height",
        "type": "graph",
        "targets": [
          {
            "expr": "besu_blockchain_head_number",
            "legendFormat": "{{instance}}"
          }
        ],
        "gridPos": {"h": 8, "w": 12, "x": 0, "y": 0}
      },
      {
        "id": 2,
        "title": "Peer Count",
        "type": "graph",
        "targets": [
          {
            "expr": "besu_peers_connected_total",
            "legendFormat": "{{instance}}"
          }
        ],
        "gridPos": {"h": 8, "w": 12, "x": 12, "y": 0}
      },
      {
        "id": 3,
        "title": "Block Production Rate",
        "type": "graph",
        "targets": [
          {
            "expr": "rate(besu_blockchain_blocks_added_total[5m])",
            "legendFormat": "{{instance}}"
          }
        ],
        "gridPos": {"h": 8, "w": 12, "x": 0, "y": 8}
      },
      {
        "id": 4,
        "title": "RPC Requests Rate",
        "type": "graph",
        "targets": [
          {
            "expr": "rate(besu_rpc_requests_total[5m])",
            "legendFormat": "{{method}} - {{instance}}"
          }
        ],
        "gridPos": {"h": 8, "w": 12, "x": 12, "y": 8}
      },
      {
        "id": 5,
        "title": "RPC Latency (P95)",
        "type": "graph",
        "targets": [
          {
            "expr": "histogram_quantile(0.95, rate(besu_rpc_requests_duration_seconds_bucket[5m]))",
            "legendFormat": "{{method}} - {{instance}}"
          }
        ],
        "gridPos": {"h": 8, "w": 12, "x": 0, "y": 16}
      },
      {
        "id": 6,
        "title": "Transaction Pool Size",
        "type": "graph",
        "targets": [
          {
            "expr": "besu_transactions_added_total",
            "legendFormat": "{{instance}}"
          }
        ],
        "gridPos": {"h": 8, "w": 12, "x": 12, "y": 16}
      },
      {
        "id": 7,
        "title": "Gas Used",
        "type": "graph",
        "targets": [
          {
            "expr": "besu_blockchain_gas_used_total",
            "legendFormat": "{{instance}}"
          }
        ],
        "gridPos": {"h": 8, "w": 12, "x": 0, "y": 24}
      },
      {
        "id": 8,
        "title": "Memory Usage",
        "type": "graph",
        "targets": [
          {
            "expr": "container_memory_usage_bytes{pod=~\"besu-.*\"} / container_spec_memory_limit_bytes{pod=~\"besu-.*\"} * 100",
            "legendFormat": "{{pod}}"
          }
        ],
        "gridPos": {"h": 8, "w": 12, "x": 12, "y": 24}
      }
    ]
  }
}

