{
  "dashboard": {
    "title": "CCIP Monitoring Dashboard",
    "tags": ["ccip", "cross-chain", "oracle"],
    "timezone": "browser",
    "schemaVersion": 27,
    "version": 1,
    "refresh": "30s",
    "panels": [
      {
        "id": 1,
        "title": "CCIP Messages Sent",
        "type": "graph",
        "targets": [
          {
            "expr": "rate(ccip_messages_sent_total[5m])",
            "legendFormat": "Messages/sec"
          }
        ],
        "gridPos": {"h": 8, "w": 12, "x": 0, "y": 0}
      },
      {
        "id": 2,
        "title": "CCIP Messages Success Rate",
        "type": "graph",
        "targets": [
          {
            "expr": "rate(ccip_messages_success_total[5m]) / rate(ccip_messages_sent_total[5m]) * 100",
            "legendFormat": "Success Rate %"
          }
        ],
        "gridPos": {"h": 8, "w": 12, "x": 12, "y": 0}
      },
      {
        "id": 3,
        "title": "CCIP Message Latency",
        "type": "graph",
        "targets": [
          {
            "expr": "histogram_quantile(0.50, rate(ccip_message_latency_seconds_bucket[5m]))",
            "legendFormat": "P50"
          },
          {
            "expr": "histogram_quantile(0.95, rate(ccip_message_latency_seconds_bucket[5m]))",
            "legendFormat": "P95"
          },
          {
            "expr": "histogram_quantile(0.99, rate(ccip_message_latency_seconds_bucket[5m]))",
            "legendFormat": "P99"
          }
        ],
        "gridPos": {"h": 8, "w": 12, "x": 0, "y": 8}
      },
      {
        "id": 4,
        "title": "CCIP Fee Consumption",
        "type": "graph",
        "targets": [
          {
            "expr": "rate(ccip_fees_total[5m])",
            "legendFormat": "LINK/sec"
          }
        ],
        "gridPos": {"h": 8, "w": 12, "x": 12, "y": 8}
      },
      {
        "id": 5,
        "title": "CCIP LINK Balance",
        "type": "stat",
        "targets": [
          {
            "expr": "ccip_link_balance",
            "legendFormat": "LINK"
          }
        ],
        "gridPos": {"h": 4, "w": 6, "x": 0, "y": 16}
      },
      {
        "id": 6,
        "title": "CCIP Error Rate",
        "type": "graph",
        "targets": [
          {
            "expr": "rate(ccip_errors_total[5m])",
            "legendFormat": "Errors/sec"
          }
        ],
        "gridPos": {"h": 8, "w": 12, "x": 0, "y": 20}
      },
      {
        "id": 7,
        "title": "CCIP Messages by Status",
        "type": "piechart",
        "targets": [
          {
            "expr": "sum by (status) (ccip_messages_total)",
            "legendFormat": "{{status}}"
          }
        ],
        "gridPos": {"h": 8, "w": 12, "x": 12, "y": 20}
      }
    ]
  }
}

