Pular para o conteúdo principal
GET
/
api
/
v1
/
remediations
/
{name}
Obter Plano de Remediação
curl --request GET \
  --url https://api.example.com/api/v1/remediations/{name}
{
  "apiVersion": "v1",
  "kind": "RemediationPlan",
  "resourceMeta": {
    "name": "remediation-inc-20260319-002-1",
    "namespace": "production",
    "creationTimestamp": "2026-03-19T15:09:00Z"
  },
  "spec": {
    "name": "remediation-inc-20260319-002-1",
    "namespace": "production",
    "issueRef": "INC-20260319-002",
    "attempt": 1,
    "strategy": "Agentic mode: no matching runbook found",
    "state": "Completed",
    "startedAt": "2026-03-19T15:10:00Z",
    "completedAt": "2026-03-19T15:16:00Z",
    "result": "Issue resolved after 4 agentic steps",
    "agenticMode": true,
    "agenticStepCount": 4,
    "actions": [],
    "creationTimestamp": "2026-03-19T15:09:00Z",
    "safetyConstraints": [
      "Do not scale below current replica count",
      "Verify health for 90 seconds after each action"
    ],
    "evidence": [
      {
        "type": "action_success",
        "data": "ScaleDeployment executed: replicas 3 -> 5",
        "timestamp": "2026-03-19T15:11:00Z"
      },
      {
        "type": "health_check",
        "data": "All 5/5 pods ready after 45 seconds",
        "timestamp": "2026-03-19T15:12:30Z"
      }
    ],
    "rollbackPerformed": false,
    "rollbackResult": "",
    "agenticHistory": [
      {
        "stepNumber": 1,
        "aiMessage": "The deployment has 3 replicas but CPU usage is at 95%. The error rate spike correlates with high CPU. I'll scale up to reduce per-pod load.",
        "action": {"type": "ScaleDeployment", "params": {"replicas": "5"}},
        "observation": "ScaleDeployment executed successfully. New pods are starting.",
        "timestamp": "2026-03-19T15:11:00Z"
      },
      {
        "stepNumber": 2,
        "aiMessage": "Pods are starting. Let me observe the metrics to verify the scale-up is helping.",
        "action": null,
        "observation": "5/5 pods ready. CPU usage dropped to 62%. Error rate decreasing.",
        "timestamp": "2026-03-19T15:12:30Z"
      },
      {
        "stepNumber": 3,
        "aiMessage": "CPU is now at safe levels and error rate is dropping. Let me also adjust the HPA to prevent this from happening again.",
        "action": {"type": "AdjustHPA", "params": {"maxReplicas": "8", "targetCPU": "70"}},
        "observation": "HPA updated. maxReplicas=8, targetCPU=70%.",
        "timestamp": "2026-03-19T15:14:00Z"
      },
      {
        "stepNumber": 4,
        "aiMessage": "The deployment is stable with healthy CPU usage and zero errors. The HPA will handle future load spikes. Issue resolved.",
        "action": null,
        "observation": "Health verified: all pods ready, error rate 0%, CPU 58%.",
        "timestamp": "2026-03-19T15:16:00Z"
      }
    ]
  }
}
name
string
obrigatório
Nome único do plano de remediação
namespace
string
padrão:"default"
Namespace Kubernetes

Detalhes da Resposta

A resposta detalhada estende o item da lista com:
CampoDescrição
safetyConstraintsRestrições que devem ser respeitadas durante a execução
evidenceEvidencias coletadas durante a execução (logs, metricas, falhas, rollbacks)
rollbackPerformedSe o rollback automático foi acionado
rollbackResultResultado da tentativa de rollback
agenticHistoryRaciocinio e ações passo a passo da IA (apenas modo agentico)

Histórico Agentico

Quando agenticMode e true, o array agenticHistory mostra a conversacao completa da IA:
  • aiMessage: O raciocinio da IA para cada passo
  • action: A ação concreta proposta (null se for um passo apenas de observacao)
  • observation: O resultado após executar a acao
  • stepNumber: Número sequencial do passo
Estes são os dados-chave para entender como a IA pensou durante o processo de remediação.
{
  "apiVersion": "v1",
  "kind": "RemediationPlan",
  "resourceMeta": {
    "name": "remediation-inc-20260319-002-1",
    "namespace": "production",
    "creationTimestamp": "2026-03-19T15:09:00Z"
  },
  "spec": {
    "name": "remediation-inc-20260319-002-1",
    "namespace": "production",
    "issueRef": "INC-20260319-002",
    "attempt": 1,
    "strategy": "Agentic mode: no matching runbook found",
    "state": "Completed",
    "startedAt": "2026-03-19T15:10:00Z",
    "completedAt": "2026-03-19T15:16:00Z",
    "result": "Issue resolved after 4 agentic steps",
    "agenticMode": true,
    "agenticStepCount": 4,
    "actions": [],
    "creationTimestamp": "2026-03-19T15:09:00Z",
    "safetyConstraints": [
      "Do not scale below current replica count",
      "Verify health for 90 seconds after each action"
    ],
    "evidence": [
      {
        "type": "action_success",
        "data": "ScaleDeployment executed: replicas 3 -> 5",
        "timestamp": "2026-03-19T15:11:00Z"
      },
      {
        "type": "health_check",
        "data": "All 5/5 pods ready after 45 seconds",
        "timestamp": "2026-03-19T15:12:30Z"
      }
    ],
    "rollbackPerformed": false,
    "rollbackResult": "",
    "agenticHistory": [
      {
        "stepNumber": 1,
        "aiMessage": "The deployment has 3 replicas but CPU usage is at 95%. The error rate spike correlates with high CPU. I'll scale up to reduce per-pod load.",
        "action": {"type": "ScaleDeployment", "params": {"replicas": "5"}},
        "observation": "ScaleDeployment executed successfully. New pods are starting.",
        "timestamp": "2026-03-19T15:11:00Z"
      },
      {
        "stepNumber": 2,
        "aiMessage": "Pods are starting. Let me observe the metrics to verify the scale-up is helping.",
        "action": null,
        "observation": "5/5 pods ready. CPU usage dropped to 62%. Error rate decreasing.",
        "timestamp": "2026-03-19T15:12:30Z"
      },
      {
        "stepNumber": 3,
        "aiMessage": "CPU is now at safe levels and error rate is dropping. Let me also adjust the HPA to prevent this from happening again.",
        "action": {"type": "AdjustHPA", "params": {"maxReplicas": "8", "targetCPU": "70"}},
        "observation": "HPA updated. maxReplicas=8, targetCPU=70%.",
        "timestamp": "2026-03-19T15:14:00Z"
      },
      {
        "stepNumber": 4,
        "aiMessage": "The deployment is stable with healthy CPU usage and zero errors. The HPA will handle future load spikes. Issue resolved.",
        "action": null,
        "observation": "Health verified: all pods ready, error rate 0%, CPU 58%.",
        "timestamp": "2026-03-19T15:16:00Z"
      }
    ]
  }
}
{
  "apiVersion": "v1",
  "kind": "Error",
  "error": {
    "code": 404,
    "message": "Remediation plan not found: remediation-inc-20260319-999"
  }
}