curl --request PUT \
--url https://api.example.com/api/v1/runbooks/{name} \
--header 'Content-Type: application/json' \
--data '
{
"description": "<string>",
"severity": [
"<string>"
],
"automated": true,
"approvalRequired": true,
"rollbackOnFailure": true,
"steps": [
{
"name": "<string>",
"description": "<string>",
"action": "<string>",
"command": "<string>",
"timeout": "<string>",
"continueOnFailure": true
}
],
"matchConditions": {
"resourceTypes": [
"<string>"
],
"descriptionPatterns": [
"<string>"
],
"namespaces": [
"<string>"
]
}
}
'{
"apiVersion": "v1",
"kind": "Runbook",
"metadata": {
"name": "runbook-oomkill-standard",
"updatedAt": "2026-03-19T16:30:00Z",
"updatedBy": "admin@empresa.com",
"version": "1.4.0"
},
"spec": {
"category": "oomkill",
"description": "Remediacao padrao para eventos OOMKill — ajusta memory limits com analise de historico",
"severity": ["high", "critical"],
"automated": true,
"approvalRequired": true,
"rollbackOnFailure": true,
"steps": [
{
"name": "diagnose-memory-usage",
"description": "Coletar metricas de uso de memoria do container",
"action": "kubectl",
"command": "top pod $POD --containers",
"timeout": "30s"
},
{
"name": "analyze-memory-history",
"description": "Analisar historico de consumo de memoria via Prometheus",
"action": "ai-analyze",
"timeout": "60s"
},
{
"name": "patch-resource-limits",
"description": "Atualizar memory limit do Deployment",
"action": "kubectl",
"command": "patch deployment $DEPLOYMENT -p '{\"spec\":{\"template\":{\"spec\":{\"containers\":[{\"name\":\"$CONTAINER\",\"resources\":{\"limits\":{\"memory\":\"$NEW_LIMIT\"}}}]}}}}'",
"timeout": "120s"
},
{
"name": "verify-stability",
"description": "Verificar estabilidade do pod apos patch",
"action": "wait",
"timeout": "180s"
}
]
}
}
Updates an existing remediation runbook
curl --request PUT \
--url https://api.example.com/api/v1/runbooks/{name} \
--header 'Content-Type: application/json' \
--data '
{
"description": "<string>",
"severity": [
"<string>"
],
"automated": true,
"approvalRequired": true,
"rollbackOnFailure": true,
"steps": [
{
"name": "<string>",
"description": "<string>",
"action": "<string>",
"command": "<string>",
"timeout": "<string>",
"continueOnFailure": true
}
],
"matchConditions": {
"resourceTypes": [
"<string>"
],
"descriptionPatterns": [
"<string>"
],
"namespaces": [
"<string>"
]
}
}
'{
"apiVersion": "v1",
"kind": "Runbook",
"metadata": {
"name": "runbook-oomkill-standard",
"updatedAt": "2026-03-19T16:30:00Z",
"updatedBy": "admin@empresa.com",
"version": "1.4.0"
},
"spec": {
"category": "oomkill",
"description": "Remediacao padrao para eventos OOMKill — ajusta memory limits com analise de historico",
"severity": ["high", "critical"],
"automated": true,
"approvalRequired": true,
"rollbackOnFailure": true,
"steps": [
{
"name": "diagnose-memory-usage",
"description": "Coletar metricas de uso de memoria do container",
"action": "kubectl",
"command": "top pod $POD --containers",
"timeout": "30s"
},
{
"name": "analyze-memory-history",
"description": "Analisar historico de consumo de memoria via Prometheus",
"action": "ai-analyze",
"timeout": "60s"
},
{
"name": "patch-resource-limits",
"description": "Atualizar memory limit do Deployment",
"action": "kubectl",
"command": "patch deployment $DEPLOYMENT -p '{\"spec\":{\"template\":{\"spec\":{\"containers\":[{\"name\":\"$CONTAINER\",\"resources\":{\"limits\":{\"memory\":\"$NEW_LIMIT\"}}}]}}}}'",
"timeout": "120s"
},
{
"name": "verify-stability",
"description": "Verificar estabilidade do pod apos patch",
"action": "wait",
"timeout": "180s"
}
]
}
}
runbook-oomkill-standard)Show Step properties
kubectl, script, ai-analyze, notification, wait{
"apiVersion": "v1",
"kind": "Runbook",
"metadata": {
"name": "runbook-oomkill-standard",
"updatedAt": "2026-03-19T16:30:00Z",
"updatedBy": "admin@empresa.com",
"version": "1.4.0"
},
"spec": {
"category": "oomkill",
"description": "Remediacao padrao para eventos OOMKill — ajusta memory limits com analise de historico",
"severity": ["high", "critical"],
"automated": true,
"approvalRequired": true,
"rollbackOnFailure": true,
"steps": [
{
"name": "diagnose-memory-usage",
"description": "Coletar metricas de uso de memoria do container",
"action": "kubectl",
"command": "top pod $POD --containers",
"timeout": "30s"
},
{
"name": "analyze-memory-history",
"description": "Analisar historico de consumo de memoria via Prometheus",
"action": "ai-analyze",
"timeout": "60s"
},
{
"name": "patch-resource-limits",
"description": "Atualizar memory limit do Deployment",
"action": "kubectl",
"command": "patch deployment $DEPLOYMENT -p '{\"spec\":{\"template\":{\"spec\":{\"containers\":[{\"name\":\"$CONTAINER\",\"resources\":{\"limits\":{\"memory\":\"$NEW_LIMIT\"}}}]}}}}'",
"timeout": "120s"
},
{
"name": "verify-stability",
"description": "Verificar estabilidade do pod apos patch",
"action": "wait",
"timeout": "180s"
}
]
}
}