{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/daytona-io/json-schema/daytona-io-runner-healthcheck-schema.json",
  "title": "RunnerHealthcheck",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/daytona-io-runners-api-openapi.yml#/components/schemas/RunnerHealthcheck",
  "properties": {
    "metrics": {
      "allOf": [
        {
          "$ref": "#/$defs/RunnerHealthMetrics"
        }
      ],
      "description": "Runner metrics"
    },
    "serviceHealth": {
      "description": "Health status of individual services on the runner",
      "items": {
        "$ref": "#/$defs/RunnerServiceHealth"
      },
      "type": "array"
    },
    "domain": {
      "description": "Runner domain",
      "type": "string"
    },
    "proxyUrl": {
      "description": "Runner proxy URL",
      "type": "string"
    },
    "apiUrl": {
      "description": "Runner API URL",
      "type": "string"
    },
    "appVersion": {
      "description": "Runner app version",
      "type": "string"
    }
  },
  "required": [
    "appVersion"
  ],
  "type": "object",
  "$defs": {
    "RunnerHealthMetrics": {
      "properties": {
        "currentCpuLoadAverage": {
          "description": "Current CPU load average",
          "type": "number"
        },
        "currentCpuUsagePercentage": {
          "description": "Current CPU usage percentage",
          "type": "number"
        },
        "currentMemoryUsagePercentage": {
          "description": "Current memory usage percentage",
          "type": "number"
        },
        "currentDiskUsagePercentage": {
          "description": "Current disk usage percentage",
          "type": "number"
        },
        "currentAllocatedCpu": {
          "description": "Currently allocated CPU cores",
          "type": "number"
        },
        "currentAllocatedMemoryGiB": {
          "description": "Currently allocated memory in GiB",
          "type": "number"
        },
        "currentAllocatedDiskGiB": {
          "description": "Currently allocated disk in GiB",
          "type": "number"
        },
        "currentSnapshotCount": {
          "description": "Number of snapshots currently stored",
          "type": "number"
        },
        "currentStartedSandboxes": {
          "description": "Number of started sandboxes",
          "type": "number"
        },
        "cpu": {
          "description": "Total CPU cores on the runner",
          "type": "number"
        },
        "memoryGiB": {
          "description": "Total RAM in GiB on the runner",
          "type": "number"
        },
        "diskGiB": {
          "description": "Total disk space in GiB on the runner",
          "type": "number"
        },
        "gpu": {
          "description": "Total number of GPUs on the runner",
          "type": "number"
        },
        "gpuType": {
          "description": "GPU model name",
          "type": "string"
        }
      },
      "required": [
        "cpu",
        "currentAllocatedCpu",
        "currentAllocatedDiskGiB",
        "currentAllocatedMemoryGiB",
        "currentCpuLoadAverage",
        "currentCpuUsagePercentage",
        "currentDiskUsagePercentage",
        "currentMemoryUsagePercentage",
        "currentSnapshotCount",
        "currentStartedSandboxes",
        "diskGiB",
        "memoryGiB"
      ],
      "type": "object"
    },
    "RunnerServiceHealth": {
      "properties": {
        "serviceName": {
          "description": "Name of the service being checked",
          "type": "string"
        },
        "healthy": {
          "description": "Whether the service is healthy",
          "type": "boolean"
        },
        "errorReason": {
          "description": "Error reason if the service is unhealthy",
          "type": "string"
        }
      },
      "required": [
        "healthy",
        "serviceName"
      ],
      "type": "object"
    }
  }
}