{
  "uid": "ftb-production-overview",
  "title": "FTB Production Overview",
  "schemaVersion": 39,
  "version": 1,
  "refresh": "30s",
  "tags": ["ftb", "production", "v2.8"],
  "time": {
    "from": "now-6h",
    "to": "now"
  },
  "panels": [
    {
      "id": 1,
      "type": "stat",
      "title": "DB Availability",
      "gridPos": { "x": 0, "y": 0, "w": 6, "h": 4 },
      "targets": [
        { "datasource": { "type": "prometheus", "uid": "Prometheus" }, "expr": "pg_up", "refId": "A" }
      ]
    },
    {
      "id": 2,
      "type": "timeseries",
      "title": "Slow API Logs",
      "gridPos": { "x": 6, "y": 0, "w": 6, "h": 4 },
      "targets": [
        { "datasource": { "type": "prometheus", "uid": "Prometheus" }, "expr": "increase(ftb_slow_api_log_total[10m])", "refId": "A" }
      ]
    },
    {
      "id": 3,
      "type": "timeseries",
      "title": "Slow Prisma Logs",
      "gridPos": { "x": 12, "y": 0, "w": 6, "h": 4 },
      "targets": [
        { "datasource": { "type": "prometheus", "uid": "Prometheus" }, "expr": "increase(ftb_slow_prisma_log_total[10m])", "refId": "A" }
      ]
    },
    {
      "id": 4,
      "type": "stat",
      "title": "Xiaobao Stale Summaries",
      "gridPos": { "x": 18, "y": 0, "w": 6, "h": 4 },
      "targets": [
        { "datasource": { "type": "prometheus", "uid": "Prometheus" }, "expr": "ftb_xiaobao_stale_summary_count", "refId": "A" }
      ]
    },
    {
      "id": 5,
      "type": "timeseries",
      "title": "Job Failure Logs",
      "gridPos": { "x": 0, "y": 4, "w": 8, "h": 5 },
      "targets": [
        { "datasource": { "type": "prometheus", "uid": "Prometheus" }, "expr": "increase(ftb_job_failure_log_total[10m])", "refId": "A" }
      ]
    },
    {
      "id": 6,
      "type": "stat",
      "title": "Root Disk Free %",
      "gridPos": { "x": 8, "y": 4, "w": 8, "h": 5 },
      "targets": [
        { "datasource": { "type": "prometheus", "uid": "Prometheus" }, "expr": "100 * node_filesystem_avail_bytes{mountpoint=\"/\",fstype!~\"tmpfs|overlay\"} / node_filesystem_size_bytes{mountpoint=\"/\",fstype!~\"tmpfs|overlay\"}", "refId": "A" }
      ]
    },
    {
      "id": 7,
      "type": "logs",
      "title": "Server Warning/Error Logs",
      "gridPos": { "x": 16, "y": 4, "w": 8, "h": 5 },
      "targets": [
        { "datasource": { "type": "loki", "uid": "Loki" }, "expr": "{compose_service=\"server\"} |~ \"warn|error|失败|Slow\"", "refId": "A" }
      ]
    }
  ]
}

