Create Runbook
curl --request POST \
--url http://{host}:{port}/{basePath}/runbooks \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "runbook-disk-cleanup",
"category": "disk",
"description": "Automatic disk cleanup when usage exceeds 85%.",
"severity": [
"medium",
"high"
],
"automated": true,
"approvalRequired": true,
"rollbackOnFailure": false,
"steps": [
{
"name": "check-disk-usage",
"description": "Check current disk usage",
"action": "kubectl",
"command": "exec -it $POD -- df -h /data",
"timeout": "30s"
},
{
"name": "cleanup-temp-files",
"description": "Remove temp files older than 7 days",
"action": "script",
"command": "find /data/tmp -mtime +7 -delete",
"timeout": "120s"
}
],
"matchConditions": {
"resourceTypes": [
"StatefulSet",
"Deployment"
],
"descriptionPatterns": [
"disk.*usage.*high",
"filesystem.*full"
],
"namespaces": [
"production",
"staging"
]
}
}
'{
"apiVersion": "v1",
"kind": "Runbook",
"metadata": {
"name": "runbook-disk-cleanup",
"createdAt": "2026-03-19T16:00:00Z",
"createdBy": "admin@empresa.com"
},
"spec": {
"category": "disk",
"description": "Limpeza automatica de disco quando uso excede 85%",
"severity": ["medium", "high"],
"automated": true,
"approvalRequired": true,
"rollbackOnFailure": false,
"steps": [
{
"name": "check-disk-usage",
"description": "Verificar uso atual do disco",
"action": "kubectl",
"command": "exec -it $POD -- df -h /data",
"timeout": "30s"
},
{
"name": "cleanup-temp-files",
"description": "Remover arquivos temporarios com mais de 7 dias",
"action": "script",
"command": "find /data/tmp -mtime +7 -delete",
"timeout": "120s"
},
{
"name": "verify-disk-usage",
"description": "Verificar uso de disco apos limpeza",
"action": "kubectl",
"command": "exec -it $POD -- df -h /data",
"timeout": "30s"
}
],
"matchConditions": {
"resourceTypes": ["StatefulSet", "Deployment"],
"descriptionPatterns": ["disk.*usage.*high", "filesystem.*full"],
"namespaces": ["production", "staging"]
}
}
}
Runbooks
Create Runbook
Creates a new remediation runbook
POST
/
runbooks
Create Runbook
curl --request POST \
--url http://{host}:{port}/{basePath}/runbooks \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "runbook-disk-cleanup",
"category": "disk",
"description": "Automatic disk cleanup when usage exceeds 85%.",
"severity": [
"medium",
"high"
],
"automated": true,
"approvalRequired": true,
"rollbackOnFailure": false,
"steps": [
{
"name": "check-disk-usage",
"description": "Check current disk usage",
"action": "kubectl",
"command": "exec -it $POD -- df -h /data",
"timeout": "30s"
},
{
"name": "cleanup-temp-files",
"description": "Remove temp files older than 7 days",
"action": "script",
"command": "find /data/tmp -mtime +7 -delete",
"timeout": "120s"
}
],
"matchConditions": {
"resourceTypes": [
"StatefulSet",
"Deployment"
],
"descriptionPatterns": [
"disk.*usage.*high",
"filesystem.*full"
],
"namespaces": [
"production",
"staging"
]
}
}
'{
"apiVersion": "v1",
"kind": "Runbook",
"metadata": {
"name": "runbook-disk-cleanup",
"createdAt": "2026-03-19T16:00:00Z",
"createdBy": "admin@empresa.com"
},
"spec": {
"category": "disk",
"description": "Limpeza automatica de disco quando uso excede 85%",
"severity": ["medium", "high"],
"automated": true,
"approvalRequired": true,
"rollbackOnFailure": false,
"steps": [
{
"name": "check-disk-usage",
"description": "Verificar uso atual do disco",
"action": "kubectl",
"command": "exec -it $POD -- df -h /data",
"timeout": "30s"
},
{
"name": "cleanup-temp-files",
"description": "Remover arquivos temporarios com mais de 7 dias",
"action": "script",
"command": "find /data/tmp -mtime +7 -delete",
"timeout": "120s"
},
{
"name": "verify-disk-usage",
"description": "Verificar uso de disco apos limpeza",
"action": "kubectl",
"command": "exec -it $POD -- df -h /data",
"timeout": "30s"
}
],
"matchConditions": {
"resourceTypes": ["StatefulSet", "Deployment"],
"descriptionPatterns": ["disk.*usage.*high", "filesystem.*full"],
"namespaces": ["production", "staging"]
}
}
}
Unique runbook name (slug, e.g.,
runbook-disk-cleanup)Category:
oomkill, crashloop, latency, scaling, disk, network, customDescription of the runbook’s objective
List of target severities:
critical, high, medium, lowWhether the runbook can be executed automatically
Whether approval is required before execution
Whether to perform automatic rollback on failure
List of runbook steps
Show Step properties
Show Step properties
Unique step identifier
Step description
Action type:
kubectl, script, ai-analyze, notification, waitCommand to execute (for
kubectl and script actions)Step timeout in Go duration format
Whether to continue to the next step even on failure
{
"apiVersion": "v1",
"kind": "Runbook",
"metadata": {
"name": "runbook-disk-cleanup",
"createdAt": "2026-03-19T16:00:00Z",
"createdBy": "admin@empresa.com"
},
"spec": {
"category": "disk",
"description": "Limpeza automatica de disco quando uso excede 85%",
"severity": ["medium", "high"],
"automated": true,
"approvalRequired": true,
"rollbackOnFailure": false,
"steps": [
{
"name": "check-disk-usage",
"description": "Verificar uso atual do disco",
"action": "kubectl",
"command": "exec -it $POD -- df -h /data",
"timeout": "30s"
},
{
"name": "cleanup-temp-files",
"description": "Remover arquivos temporarios com mais de 7 dias",
"action": "script",
"command": "find /data/tmp -mtime +7 -delete",
"timeout": "120s"
},
{
"name": "verify-disk-usage",
"description": "Verificar uso de disco apos limpeza",
"action": "kubectl",
"command": "exec -it $POD -- df -h /data",
"timeout": "30s"
}
],
"matchConditions": {
"resourceTypes": ["StatefulSet", "Deployment"],
"descriptionPatterns": ["disk.*usage.*high", "filesystem.*full"],
"namespaces": ["production", "staging"]
}
}
}
Authorizations
Bearer token issued by the operator. Format: Authorization: Bearer <token>.
Body
application/json
Example:
"runbook-disk-cleanup"
Available options:
oomkill, crashloop, latency, scaling, disk, network, custom Available options:
critical, high, medium, low Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I