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"
]
}
}
'import requests
url = "http://{host}:{port}/{basePath}/runbooks"
payload = {
"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"]
}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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']
}
})
};
fetch('http://{host}:{port}/{basePath}/runbooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "62437",
CURLOPT_URL => "http://{host}:{port}/{basePath}/runbooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://{host}:{port}/{basePath}/runbooks"
payload := strings.NewReader("{\n \"name\": \"runbook-disk-cleanup\",\n \"category\": \"disk\",\n \"description\": \"Automatic disk cleanup when usage exceeds 85%.\",\n \"severity\": [\n \"medium\",\n \"high\"\n ],\n \"automated\": true,\n \"approvalRequired\": true,\n \"rollbackOnFailure\": false,\n \"steps\": [\n {\n \"name\": \"check-disk-usage\",\n \"description\": \"Check current disk usage\",\n \"action\": \"kubectl\",\n \"command\": \"exec -it $POD -- df -h /data\",\n \"timeout\": \"30s\"\n },\n {\n \"name\": \"cleanup-temp-files\",\n \"description\": \"Remove temp files older than 7 days\",\n \"action\": \"script\",\n \"command\": \"find /data/tmp -mtime +7 -delete\",\n \"timeout\": \"120s\"\n }\n ],\n \"matchConditions\": {\n \"resourceTypes\": [\n \"StatefulSet\",\n \"Deployment\"\n ],\n \"descriptionPatterns\": [\n \"disk.*usage.*high\",\n \"filesystem.*full\"\n ],\n \"namespaces\": [\n \"production\",\n \"staging\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://{host}:{port}/{basePath}/runbooks")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"runbook-disk-cleanup\",\n \"category\": \"disk\",\n \"description\": \"Automatic disk cleanup when usage exceeds 85%.\",\n \"severity\": [\n \"medium\",\n \"high\"\n ],\n \"automated\": true,\n \"approvalRequired\": true,\n \"rollbackOnFailure\": false,\n \"steps\": [\n {\n \"name\": \"check-disk-usage\",\n \"description\": \"Check current disk usage\",\n \"action\": \"kubectl\",\n \"command\": \"exec -it $POD -- df -h /data\",\n \"timeout\": \"30s\"\n },\n {\n \"name\": \"cleanup-temp-files\",\n \"description\": \"Remove temp files older than 7 days\",\n \"action\": \"script\",\n \"command\": \"find /data/tmp -mtime +7 -delete\",\n \"timeout\": \"120s\"\n }\n ],\n \"matchConditions\": {\n \"resourceTypes\": [\n \"StatefulSet\",\n \"Deployment\"\n ],\n \"descriptionPatterns\": [\n \"disk.*usage.*high\",\n \"filesystem.*full\"\n ],\n \"namespaces\": [\n \"production\",\n \"staging\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://{host}:{port}/{basePath}/runbooks")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"runbook-disk-cleanup\",\n \"category\": \"disk\",\n \"description\": \"Automatic disk cleanup when usage exceeds 85%.\",\n \"severity\": [\n \"medium\",\n \"high\"\n ],\n \"automated\": true,\n \"approvalRequired\": true,\n \"rollbackOnFailure\": false,\n \"steps\": [\n {\n \"name\": \"check-disk-usage\",\n \"description\": \"Check current disk usage\",\n \"action\": \"kubectl\",\n \"command\": \"exec -it $POD -- df -h /data\",\n \"timeout\": \"30s\"\n },\n {\n \"name\": \"cleanup-temp-files\",\n \"description\": \"Remove temp files older than 7 days\",\n \"action\": \"script\",\n \"command\": \"find /data/tmp -mtime +7 -delete\",\n \"timeout\": \"120s\"\n }\n ],\n \"matchConditions\": {\n \"resourceTypes\": [\n \"StatefulSet\",\n \"Deployment\"\n ],\n \"descriptionPatterns\": [\n \"disk.*usage.*high\",\n \"filesystem.*full\"\n ],\n \"namespaces\": [\n \"production\",\n \"staging\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"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"
]
}
}
'import requests
url = "http://{host}:{port}/{basePath}/runbooks"
payload = {
"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"]
}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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']
}
})
};
fetch('http://{host}:{port}/{basePath}/runbooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "62437",
CURLOPT_URL => "http://{host}:{port}/{basePath}/runbooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://{host}:{port}/{basePath}/runbooks"
payload := strings.NewReader("{\n \"name\": \"runbook-disk-cleanup\",\n \"category\": \"disk\",\n \"description\": \"Automatic disk cleanup when usage exceeds 85%.\",\n \"severity\": [\n \"medium\",\n \"high\"\n ],\n \"automated\": true,\n \"approvalRequired\": true,\n \"rollbackOnFailure\": false,\n \"steps\": [\n {\n \"name\": \"check-disk-usage\",\n \"description\": \"Check current disk usage\",\n \"action\": \"kubectl\",\n \"command\": \"exec -it $POD -- df -h /data\",\n \"timeout\": \"30s\"\n },\n {\n \"name\": \"cleanup-temp-files\",\n \"description\": \"Remove temp files older than 7 days\",\n \"action\": \"script\",\n \"command\": \"find /data/tmp -mtime +7 -delete\",\n \"timeout\": \"120s\"\n }\n ],\n \"matchConditions\": {\n \"resourceTypes\": [\n \"StatefulSet\",\n \"Deployment\"\n ],\n \"descriptionPatterns\": [\n \"disk.*usage.*high\",\n \"filesystem.*full\"\n ],\n \"namespaces\": [\n \"production\",\n \"staging\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://{host}:{port}/{basePath}/runbooks")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"runbook-disk-cleanup\",\n \"category\": \"disk\",\n \"description\": \"Automatic disk cleanup when usage exceeds 85%.\",\n \"severity\": [\n \"medium\",\n \"high\"\n ],\n \"automated\": true,\n \"approvalRequired\": true,\n \"rollbackOnFailure\": false,\n \"steps\": [\n {\n \"name\": \"check-disk-usage\",\n \"description\": \"Check current disk usage\",\n \"action\": \"kubectl\",\n \"command\": \"exec -it $POD -- df -h /data\",\n \"timeout\": \"30s\"\n },\n {\n \"name\": \"cleanup-temp-files\",\n \"description\": \"Remove temp files older than 7 days\",\n \"action\": \"script\",\n \"command\": \"find /data/tmp -mtime +7 -delete\",\n \"timeout\": \"120s\"\n }\n ],\n \"matchConditions\": {\n \"resourceTypes\": [\n \"StatefulSet\",\n \"Deployment\"\n ],\n \"descriptionPatterns\": [\n \"disk.*usage.*high\",\n \"filesystem.*full\"\n ],\n \"namespaces\": [\n \"production\",\n \"staging\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://{host}:{port}/{basePath}/runbooks")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"runbook-disk-cleanup\",\n \"category\": \"disk\",\n \"description\": \"Automatic disk cleanup when usage exceeds 85%.\",\n \"severity\": [\n \"medium\",\n \"high\"\n ],\n \"automated\": true,\n \"approvalRequired\": true,\n \"rollbackOnFailure\": false,\n \"steps\": [\n {\n \"name\": \"check-disk-usage\",\n \"description\": \"Check current disk usage\",\n \"action\": \"kubectl\",\n \"command\": \"exec -it $POD -- df -h /data\",\n \"timeout\": \"30s\"\n },\n {\n \"name\": \"cleanup-temp-files\",\n \"description\": \"Remove temp files older than 7 days\",\n \"action\": \"script\",\n \"command\": \"find /data/tmp -mtime +7 -delete\",\n \"timeout\": \"120s\"\n }\n ],\n \"matchConditions\": {\n \"resourceTypes\": [\n \"StatefulSet\",\n \"Deployment\"\n ],\n \"descriptionPatterns\": [\n \"disk.*usage.*high\",\n \"filesystem.*full\"\n ],\n \"namespaces\": [\n \"production\",\n \"staging\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"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"]
}
}
}
string
required
Unique runbook name (slug, e.g.,
runbook-disk-cleanup)string
required
Category:
oomkill, crashloop, latency, scaling, disk, network, customstring
required
Description of the runbook’s objective
string[]
required
List of target severities:
critical, high, medium, lowboolean
default:"false"
Whether the runbook can be executed automatically
boolean
default:"true"
Whether approval is required before execution
boolean
default:"true"
Whether to perform automatic rollback on failure
object[]
required
List of runbook steps
Show Step properties
Show Step properties
string
required
Unique step identifier
string
required
Step description
string
required
Action type:
kubectl, script, ai-analyze, notification, waitstring
Command to execute (for
kubectl and script actions)string
default:"60s"
Step timeout in Go duration format
boolean
default:"false"
Whether to continue to the next step even on failure
object
{
"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