{
  "dashboard": {
    "id": null,
    "title": "Genex Chain Operations",
    "tags": ["genex", "blockchain"],
    "timezone": "browser",
    "refresh": "10s",
    "time": { "from": "now-6h", "to": "now" },
    "panels": [
      {
        "id": 1, "title": "Block Height", "type": "stat", "gridPos": { "h": 4, "w": 4, "x": 0, "y": 0 },
        "targets": [{ "expr": "cometbft_consensus_height", "legendFormat": "Height" }],
        "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "thresholds": { "steps": [{ "color": "green", "value": null }] } } }
      },
      {
        "id": 2, "title": "Block Time", "type": "timeseries", "gridPos": { "h": 8, "w": 8, "x": 4, "y": 0 },
        "targets": [{ "expr": "rate(cometbft_consensus_height[1m])", "legendFormat": "Blocks/min" }]
      },
      {
        "id": 3, "title": "Validator Status", "type": "table", "gridPos": { "h": 8, "w": 6, "x": 12, "y": 0 },
        "targets": [{ "expr": "cometbft_consensus_validators", "legendFormat": "Validators" }]
      },
      {
        "id": 4, "title": "P2P Peers", "type": "gauge", "gridPos": { "h": 4, "w": 4, "x": 18, "y": 0 },
        "targets": [{ "expr": "cometbft_p2p_peers", "legendFormat": "Peers" }],
        "fieldConfig": { "defaults": { "thresholds": { "steps": [{ "color": "red", "value": 0 }, { "color": "yellow", "value": 10 }, { "color": "green", "value": 20 }] }, "min": 0, "max": 50 } }
      },
      {
        "id": 5, "title": "TX Throughput", "type": "timeseries", "gridPos": { "h": 8, "w": 8, "x": 0, "y": 8 },
        "targets": [{ "expr": "rate(evm_tx_count[5m])", "legendFormat": "TX/s" }]
      },
      {
        "id": 6, "title": "Mempool Size", "type": "gauge", "gridPos": { "h": 4, "w": 4, "x": 8, "y": 8 },
        "targets": [{ "expr": "cometbft_mempool_size", "legendFormat": "Pending TX" }],
        "fieldConfig": { "defaults": { "thresholds": { "steps": [{ "color": "green", "value": 0 }, { "color": "yellow", "value": 1000 }, { "color": "red", "value": 5000 }] }, "min": 0, "max": 10000 } }
      },
      {
        "id": 7, "title": "TX Success Rate", "type": "gauge", "gridPos": { "h": 4, "w": 4, "x": 8, "y": 12 },
        "targets": [{ "expr": "rate(evm_tx_success[5m]) / rate(evm_tx_count[5m]) * 100", "legendFormat": "%" }],
        "fieldConfig": { "defaults": { "unit": "percent", "thresholds": { "steps": [{ "color": "red", "value": 0 }, { "color": "yellow", "value": 90 }, { "color": "green", "value": 95 }] }, "min": 0, "max": 100 } }
      },
      {
        "id": 8, "title": "Relayer GNX Balance", "type": "stat", "gridPos": { "h": 4, "w": 4, "x": 12, "y": 8 },
        "targets": [{ "expr": "relayer_wallet_balance_gnx", "legendFormat": "GNX" }],
        "fieldConfig": { "defaults": { "thresholds": { "steps": [{ "color": "red", "value": 0 }, { "color": "yellow", "value": 10000 }, { "color": "green", "value": 50000 }] } } }
      },
      {
        "id": 9, "title": "Coupon Minted (24h)", "type": "stat", "gridPos": { "h": 4, "w": 4, "x": 16, "y": 8 },
        "targets": [{ "expr": "increase(coupon_minted_total[24h])", "legendFormat": "Coupons" }]
      },
      {
        "id": 10, "title": "Bridge TVL", "type": "timeseries", "gridPos": { "h": 8, "w": 8, "x": 12, "y": 12 },
        "targets": [{ "expr": "bridge_total_value_locked", "legendFormat": "TVL (USD)" }]
      },
      {
        "id": 11, "title": "Disk Usage", "type": "gauge", "gridPos": { "h": 4, "w": 4, "x": 20, "y": 8 },
        "targets": [{ "expr": "(1 - node_filesystem_avail_bytes{mountpoint='/'} / node_filesystem_size_bytes{mountpoint='/'}) * 100", "legendFormat": "%" }],
        "fieldConfig": { "defaults": { "unit": "percent", "thresholds": { "steps": [{ "color": "green", "value": 0 }, { "color": "yellow", "value": 70 }, { "color": "red", "value": 80 }] }, "min": 0, "max": 100 } }
      },
      {
        "id": 12, "title": "Gas Subsidy Usage (24h)", "type": "timeseries", "gridPos": { "h": 8, "w": 12, "x": 0, "y": 16 },
        "targets": [{ "expr": "increase(relayer_gas_spent_total[24h])", "legendFormat": "Gas Spent" }]
      }
    ]
  }
}
