{
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "grafana",
          "uid": "-- Grafana --"
        },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 0,
  "id": null,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "datasource": {
        "type": "grafana-postgresql-datasource"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "yellow",
                "value": 70
              },
              {
                "color": "red",
                "value": 85
              }
            ]
          },
          "unit": "percent"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 6,
        "x": 0,
        "y": 0
      },
      "id": 1,
      "options": {
        "orientation": "auto",
        "reduceOptions": {
          "values": false,
          "calcs": [
            "lastNotNull"
          ],
          "fields": ""
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true
      },
      "pluginVersion": "10.0.0",
      "targets": [
        {
          "datasource": {
            "type": "grafana-postgresql-datasource"
          },
          "format": "table",
          "rawSql": "SELECT \n  COALESCE(\n    (pg_database_size(current_database())::float / \n    (SELECT setting::bigint FROM pg_settings WHERE name = 'shared_buffers') * 8192) * 100,\n    0\n  ) as value",
          "refId": "A"
        }
      ],
      "title": "Database Memory Usage",
      "type": "gauge"
    },
    {
      "datasource": {
        "type": "grafana-postgresql-datasource"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "decbytes"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 6,
        "x": 6,
        "y": 0
      },
      "id": 2,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "values": false,
          "calcs": [
            "lastNotNull"
          ],
          "fields": ""
        },
        "textMode": "value"
      },
      "pluginVersion": "10.0.0",
      "targets": [
        {
          "datasource": {
            "type": "grafana-postgresql-datasource"
          },
          "format": "table",
          "rawSql": "SELECT COALESCE(pg_database_size(current_database()), 0) as value",
          "refId": "A"
        }
      ],
      "title": "Total Database Size",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "grafana-postgresql-datasource"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "yellow",
                "value": 50000
              },
              {
                "color": "red",
                "value": 100000
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 6,
        "x": 12,
        "y": 0
      },
      "id": 3,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "values": false,
          "calcs": [
            "lastNotNull"
          ],
          "fields": ""
        },
        "textMode": "value"
      },
      "pluginVersion": "10.0.0",
      "targets": [
        {
          "datasource": {
            "type": "grafana-postgresql-datasource"
          },
          "format": "table",
          "rawSql": "SELECT COALESCE(COUNT(*), 0) as value FROM races WHERE \"startTime\" >= NOW() - INTERVAL '24 hours'",
          "refId": "A"
        }
      ],
      "title": "Races (24h)",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "grafana-postgresql-datasource"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "yellow",
                "value": 500000
              },
              {
                "color": "red",
                "value": 1000000
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 6,
        "x": 18,
        "y": 0
      },
      "id": 4,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "values": false,
          "calcs": [
            "lastNotNull"
          ],
          "fields": ""
        },
        "textMode": "value"
      },
      "pluginVersion": "10.0.0",
      "targets": [
        {
          "datasource": {
            "type": "grafana-postgresql-datasource"
          },
          "format": "table",
          "rawSql": "SELECT COALESCE(COUNT(*), 0) as value FROM runners WHERE \"createdAt\" >= NOW() - INTERVAL '24 hours'",
          "refId": "A"
        }
      ],
      "title": "Runners Created (24h)",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "grafana-postgresql-datasource"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 10,
            "gradientMode": "none",
            "hideFrom": {
              "tooltip": false,
              "viz": false,
              "legend": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 2,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 8
      },
      "id": 5,
      "options": {
        "legend": {
          "calcs": [
            "mean",
            "lastNotNull"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "pluginVersion": "10.0.0",
      "targets": [
        {
          "datasource": {
            "type": "grafana-postgresql-datasource"
          },
          "format": "time_series",
          "rawSql": "SELECT \n  DATE_TRUNC('day', \"startTime\") as time,\n  COUNT(*) as value,\n  CASE WHEN EXTRACT(DOW FROM \"startTime\") IN (0, 6) THEN 'Weekend' ELSE 'Weekday' END as metric\nFROM races\nWHERE \"startTime\" >= NOW() - INTERVAL '30 days'\nGROUP BY DATE_TRUNC('day', \"startTime\"), EXTRACT(DOW FROM \"startTime\")\nORDER BY time",
          "refId": "A"
        }
      ],
      "title": "Daily Race Volume - Weekend vs Weekday",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "grafana-postgresql-datasource"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 10,
            "gradientMode": "none",
            "hideFrom": {
              "tooltip": false,
              "viz": false,
              "legend": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 2,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 8
      },
      "id": 6,
      "options": {
        "legend": {
          "calcs": [
            "mean",
            "lastNotNull"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "pluginVersion": "10.0.0",
      "targets": [
        {
          "datasource": {
            "type": "grafana-postgresql-datasource"
          },
          "format": "time_series",
          "rawSql": "SELECT \n  DATE_TRUNC('day', ru.\"createdAt\") as time,\n  COUNT(*) as value,\n  CASE WHEN EXTRACT(DOW FROM ru.\"createdAt\") IN (0, 6) THEN 'Weekend' ELSE 'Weekday' END as metric\nFROM runners ru\nWHERE ru.\"createdAt\" >= NOW() - INTERVAL '30 days'\nGROUP BY DATE_TRUNC('day', ru.\"createdAt\"), EXTRACT(DOW FROM ru.\"createdAt\")\nORDER BY time",
          "refId": "A"
        }
      ],
      "title": "Daily Runner Creation - Weekend vs Weekday",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "grafana-postgresql-datasource"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 10,
            "gradientMode": "none",
            "hideFrom": {
              "tooltip": false,
              "viz": false,
              "legend": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "normal"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "decbytes"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 16
      },
      "id": 7,
      "options": {
        "legend": {
          "calcs": [
            "mean",
            "lastNotNull"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "pluginVersion": "10.0.0",
      "targets": [
        {
          "datasource": {
            "type": "grafana-postgresql-datasource"
          },
          "format": "time_series",
          "rawSql": "SELECT \n  NOW() as time,\n  COALESCE(pg_total_relation_size('\"Meeting\"'), 0) as \"Meeting\",\n  COALESCE(pg_total_relation_size('\"Race\"'), 0) as \"Race\",\n  COALESCE(pg_total_relation_size('\"Runner\"'), 0) as \"Runner\",\n  COALESCE(pg_total_relation_size('\"Result\"'), 0) as \"Result\",\n  COALESCE(pg_total_relation_size('\"Dividend\"'), 0) as \"Dividend\",\n  COALESCE(pg_total_relation_size('\"OddsSnapshot\"'), 0) as \"OddsSnapshot\"",
          "refId": "A"
        }
      ],
      "title": "Table Storage Size",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "grafana-postgresql-datasource"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 10,
            "gradientMode": "none",
            "hideFrom": {
              "tooltip": false,
              "viz": false,
              "legend": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 16
      },
      "id": 8,
      "options": {
        "legend": {
          "calcs": [
            "mean",
            "lastNotNull"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "pluginVersion": "10.0.0",
      "targets": [
        {
          "datasource": {
            "type": "grafana-postgresql-datasource"
          },
          "format": "time_series",
          "rawSql": "SELECT \n  DATE_TRUNC('day', \"createdAt\") as time,\n  COUNT(*) as value\nFROM meetings\nWHERE \"createdAt\" >= NOW() - INTERVAL '30 days'\nGROUP BY DATE_TRUNC('day', \"createdAt\")\nORDER BY time",
          "refId": "A"
        }
      ],
      "title": "Meeting Creation Rate (30d trend)",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "grafana-postgresql-datasource"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "bars",
            "fillOpacity": 80,
            "gradientMode": "none",
            "hideFrom": {
              "tooltip": false,
              "viz": false,
              "legend": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 24
      },
      "id": 9,
      "options": {
        "legend": {
          "calcs": [
            "mean",
            "max"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "pluginVersion": "10.0.0",
      "targets": [
        {
          "datasource": {
            "type": "grafana-postgresql-datasource"
          },
          "format": "time_series",
          "rawSql": "WITH daily_stats AS (\n  SELECT \n    DATE_TRUNC('day', r.\"startTime\") as day,\n    EXTRACT(DOW FROM r.\"startTime\") as dow\n  FROM races r\n  WHERE r.\"startTime\" >= NOW() - INTERVAL '30 days'\n)\nSELECT \n  day as time,\n  CASE \n    WHEN dow = 0 THEN 'Sunday'\n    WHEN dow = 1 THEN 'Monday'\n    WHEN dow = 2 THEN 'Tuesday'\n    WHEN dow = 3 THEN 'Wednesday'\n    WHEN dow = 4 THEN 'Thursday'\n    WHEN dow = 5 THEN 'Friday'\n    WHEN dow = 6 THEN 'Saturday'\n  END as metric,\n  COUNT(*) as value\nFROM daily_stats\nGROUP BY day, dow\nORDER BY day",
          "refId": "A"
        }
      ],
      "title": "Race Volume by Day of Week",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "grafana-postgresql-datasource"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "yellow",
                "value": 2.5
              },
              {
                "color": "red",
                "value": 3.5
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 24
      },
      "id": 10,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "values": false,
          "calcs": [
            "lastNotNull"
          ],
          "fields": ""
        },
        "textMode": "value"
      },
      "pluginVersion": "10.0.0",
      "targets": [
        {
          "datasource": {
            "type": "grafana-postgresql-datasource"
          },
          "format": "table",
          "rawSql": "WITH weekend_avg AS (\n  SELECT AVG(daily_count) as avg_count\n  FROM (\n    SELECT DATE_TRUNC('day', \"startTime\") as day, COUNT(*) as daily_count\n    FROM races\n    WHERE \"startTime\" >= NOW() - INTERVAL '30 days'\n      AND EXTRACT(DOW FROM \"startTime\") IN (0, 6)\n    GROUP BY DATE_TRUNC('day', \"startTime\")\n  ) weekend_days\n),\nweekday_avg AS (\n  SELECT AVG(daily_count) as avg_count\n  FROM (\n    SELECT DATE_TRUNC('day', \"startTime\") as day, COUNT(*) as daily_count\n    FROM races\n    WHERE \"startTime\" >= NOW() - INTERVAL '30 days'\n      AND EXTRACT(DOW FROM \"startTime\") NOT IN (0, 6)\n    GROUP BY DATE_TRUNC('day', \"startTime\")\n  ) weekday_days\n)\nSELECT \n  COALESCE(\n    ROUND((weekend_avg.avg_count / NULLIF(weekday_avg.avg_count, 0))::numeric, 2),\n    0\n  ) as value\nFROM weekend_avg, weekday_avg",
          "refId": "A"
        }
      ],
      "title": "Weekend Traffic Multiplier (30d avg)",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "grafana-postgresql-datasource"
      },
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "auto",
            "cellOptions": {
              "type": "auto"
            },
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "short"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Table Size"
            },
            "properties": [
              {
                "id": "unit",
                "value": "decbytes"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Index Size"
            },
            "properties": [
              {
                "id": "unit",
                "value": "decbytes"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Total Size"
            },
            "properties": [
              {
                "id": "unit",
                "value": "decbytes"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 24,
        "x": 0,
        "y": 32
      },
      "id": 11,
      "options": {
        "cellHeight": "sm",
        "footer": {
          "countRows": false,
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true
      },
      "pluginVersion": "10.0.0",
      "targets": [
        {
          "datasource": {
            "type": "grafana-postgresql-datasource"
          },
          "format": "table",
          "rawSql": "SELECT \n  schemaname as \"Schema\",\n  tablename as \"Table\",\n  COALESCE(pg_size_pretty(pg_total_relation_size(schemaname||'.'||tablename)), '0 bytes') as \"Total Size\",\n  COALESCE(pg_size_pretty(pg_relation_size(schemaname||'.'||tablename)), '0 bytes') as \"Table Size\",\n  COALESCE(pg_size_pretty(pg_total_relation_size(schemaname||'.'||tablename) - pg_relation_size(schemaname||'.'||tablename)), '0 bytes') as \"Index Size\"\nFROM pg_tables\nWHERE schemaname = 'public'\nORDER BY pg_total_relation_size(schemaname||'.'||tablename) DESC",
          "refId": "A"
        }
      ],
      "title": "Table Storage Breakdown",
      "type": "table"
    },
    {
      "datasource": {
        "type": "grafana-postgresql-datasource"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 10,
            "gradientMode": "none",
            "hideFrom": {
              "tooltip": false,
              "viz": false,
              "legend": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 2,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 40
      },
      "id": 12,
      "options": {
        "legend": {
          "calcs": [
            "mean",
            "lastNotNull",
            "max"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "pluginVersion": "10.0.0",
      "targets": [
        {
          "datasource": {
            "type": "grafana-postgresql-datasource"
          },
          "format": "time_series",
          "rawSql": "SELECT \n  DATE_TRUNC('hour', \"completedAt\") as time,\n  AVG(\"duration\") / 1000 as value,\n  \"name\" as metric\nFROM job_runs\nWHERE \"completedAt\" >= NOW() - INTERVAL '7 days'\n  AND status = 'success'\nGROUP BY DATE_TRUNC('hour', \"completedAt\"), \"name\"\nORDER BY time",
          "refId": "A"
        }
      ],
      "title": "Job Duration Trends (7d)",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "grafana-postgresql-datasource"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 10,
            "gradientMode": "none",
            "hideFrom": {
              "tooltip": false,
              "viz": false,
              "legend": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 2,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 40
      },
      "id": 13,
      "options": {
        "legend": {
          "calcs": [
            "mean",
            "lastNotNull"
          ],
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "pluginVersion": "10.0.0",
      "targets": [
        {
          "datasource": {
            "type": "grafana-postgresql-datasource"
          },
          "format": "time_series",
          "rawSql": "SELECT \n  DATE_TRUNC('day', d.\"createdAt\") as time,\n  COUNT(*) as value\nFROM dividends d\nWHERE d.\"createdAt\" >= NOW() - INTERVAL '30 days'\nGROUP BY DATE_TRUNC('day', d.\"createdAt\")\nORDER BY time",
          "refId": "A"
        }
      ],
      "title": "Dividend Processing Rate (30d)",
      "type": "timeseries"
    }
  ],
  "refresh": "1m",
  "schemaVersion": 38,
  "style": "dark",
  "tags": [
    "racing",
    "capacity",
    "planning"
  ],
  "templating": {
    "list": []
  },
  "time": {
    "from": "now-30d",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "",
  "title": "Racing Scraper - Capacity Planning",
  "uid": "racing-capacity-planning",
  "version": 1,
  "weekStart": ""
}
