{
  "uid": "veronica-os",
  "title": "VERONICA OS",
  "refresh": "10s",
  "schemaVersion": 38,
  "version": 1,
  "timezone": "browser",
  "time": {
    "from": "now-1h",
    "to": "now"
  },
  "tags": ["veronica"],
  "templating": {
    "list": [
      {
        "current": {
          "selected": false,
          "text": "Prometheus",
          "value": "Prometheus"
        },
        "hide": 0,
        "includeAll": false,
        "label": "Datasource",
        "multi": false,
        "name": "datasource",
        "options": [],
        "query": "prometheus",
        "refresh": 1,
        "type": "datasource"
      }
    ]
  },
  "panels": [
    {
      "id": 1,
      "type": "timeseries",
      "title": "Steps Completed / sec",
      "gridPos": { "h": 8, "w": 12, "x": 0, "y": 0 },
      "fieldConfig": {
        "defaults": {
          "custom": {
            "stacking": { "mode": "normal", "group": "A" }
          }
        },
        "overrides": []
      },
      "options": {
        "legend": { "displayMode": "list", "placement": "bottom" },
        "tooltip": { "mode": "multi" }
      },
      "targets": [
        {
          "datasource": { "type": "prometheus", "uid": "${datasource}" },
          "expr": "sum by (decision_type) (rate(veronica_step_completed_total[5m]))",
          "legendFormat": "{{decision_type}}",
          "refId": "A"
        }
      ],
      "datasource": { "type": "prometheus", "uid": "${datasource}" }
    },
    {
      "id": 2,
      "type": "timeseries",
      "title": "Halt Rate / sec",
      "gridPos": { "h": 8, "w": 12, "x": 12, "y": 0 },
      "fieldConfig": {
        "defaults": {
          "color": { "mode": "fixed", "fixedColor": "red" }
        },
        "overrides": []
      },
      "options": {
        "legend": { "displayMode": "list", "placement": "bottom" },
        "tooltip": { "mode": "multi" }
      },
      "targets": [
        {
          "datasource": { "type": "prometheus", "uid": "${datasource}" },
          "expr": "sum(rate(veronica_halt_total[5m]))",
          "legendFormat": "halts/sec",
          "refId": "A"
        }
      ],
      "datasource": { "type": "prometheus", "uid": "${datasource}" }
    },
    {
      "id": 3,
      "type": "stat",
      "title": "Active Chains",
      "gridPos": { "h": 4, "w": 6, "x": 0, "y": 8 },
      "fieldConfig": {
        "defaults": {
          "thresholds": {
            "mode": "absolute",
            "steps": [
              { "color": "green", "value": null },
              { "color": "yellow", "value": 100 },
              { "color": "red", "value": 500 }
            ]
          },
          "mappings": []
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": { "calcs": ["lastNotNull"] },
        "orientation": "auto",
        "textMode": "auto",
        "colorMode": "background",
        "graphMode": "area"
      },
      "targets": [
        {
          "datasource": { "type": "prometheus", "uid": "${datasource}" },
          "expr": "veronica_active_chains",
          "legendFormat": "chains",
          "refId": "A"
        }
      ],
      "datasource": { "type": "prometheus", "uid": "${datasource}" }
    },
    {
      "id": 4,
      "type": "timeseries",
      "title": "Step Duration (seconds)",
      "gridPos": { "h": 8, "w": 18, "x": 6, "y": 8 },
      "fieldConfig": {
        "defaults": {
          "unit": "s"
        },
        "overrides": []
      },
      "options": {
        "legend": { "displayMode": "list", "placement": "bottom" },
        "tooltip": { "mode": "multi" }
      },
      "targets": [
        {
          "datasource": { "type": "prometheus", "uid": "${datasource}" },
          "expr": "histogram_quantile(0.50, sum by (le) (rate(veronica_step_duration_seconds_bucket[5m])))",
          "legendFormat": "p50",
          "refId": "A"
        },
        {
          "datasource": { "type": "prometheus", "uid": "${datasource}" },
          "expr": "histogram_quantile(0.95, sum by (le) (rate(veronica_step_duration_seconds_bucket[5m])))",
          "legendFormat": "p95",
          "refId": "B"
        },
        {
          "datasource": { "type": "prometheus", "uid": "${datasource}" },
          "expr": "histogram_quantile(0.99, sum by (le) (rate(veronica_step_duration_seconds_bucket[5m])))",
          "legendFormat": "p99",
          "refId": "C"
        }
      ],
      "datasource": { "type": "prometheus", "uid": "${datasource}" }
    },
    {
      "id": 5,
      "type": "timeseries",
      "title": "Halts by Chain",
      "gridPos": { "h": 8, "w": 24, "x": 0, "y": 16 },
      "fieldConfig": {
        "defaults": {},
        "overrides": []
      },
      "options": {
        "legend": { "displayMode": "list", "placement": "bottom" },
        "tooltip": { "mode": "multi" }
      },
      "targets": [
        {
          "datasource": { "type": "prometheus", "uid": "${datasource}" },
          "expr": "sum by (chain_id) (rate(veronica_halt_total[5m]))",
          "legendFormat": "{{chain_id}}",
          "refId": "A"
        }
      ],
      "datasource": { "type": "prometheus", "uid": "${datasource}" }
    }
  ]
}
