---
title: "Get cluster diagnosis report"
method: GET
path: "/api/v1/k8s/logs/clusters/{cluster_id}/diagnose"
tags: ["K8s Diagnosis"]
---

# Get cluster diagnosis report

`GET /api/v1/k8s/logs/clusters/{cluster_id}/diagnose`

## Request

- Base URL: `http://localhost:8080`
- URL: `http://localhost:8080/api/v1/k8s/logs/clusters/{cluster_id}/diagnose`
- Auth: none declared

Retrieve a diagnosis report for a Kubernetes cluster, listing problematic resources and suggested solutions (K8sGPT-like data collection)

## Path parameters

- `cluster_id` string, required

## Response `200`

Diagnosis report

- K8sLogsDiagnosisReport
  - `clusterId` string
  - `problems` K8sLogsProblematicResource[]
    - `events` string[]: Relevant recent events
    - `kind` string: e.g., "Pod", "Deployment", "StatefulSet"
    - `message` string: Detailed message from status or events
    - `name` string
    - `namespace` string
    - `reason` string: e.g., "CrashLoopBackOff", "ImagePullBackOff", "Pending"
    - `solution` string: A suggested solution (can be AI-generated externally)
  - `summary` object: e.g., {"HighSeverityProblems": 5}
  - `timestamp` string

## Other responses

- `400`: Bad Request
- `500`: Internal Server Error

---

[API](https://skmtc.dev/nife/apis/nife-io-swagger-api.md) - [All operations](https://skmtc.dev/nife/apis/nife-io-swagger-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nife/apis/nife-io-swagger-api/revisions/6e868dc62795?raw)
