Skip to main content
These examples are complete, ready-to-use scenarios. Each includes the full scenario.json, inventory.ini, and all three playbooks. Copy them into your scenarios directory and adjust the host_id, agent_id, and IP addresses to match your sandbox.

Disk Full

A scenario where a disk is filling up. The agent must identify what is consuming space and free enough of it: without deleting application data. Compliance checks: Did the agent inspect disk usage? Did it identify the largest consumers before acting? Task validation: Is there enough free space after the agent finishes?
{
  "key": "disk/001-disk-full",
  "name": "Disk Full",
  "description": "@2501 the /var partition on sandbox-app-01 is at 95% capacity and the application is starting to throw write errors. Identify what is consuming the most space and free up at least 5GB. Do not delete anything under /var/www or /var/lib/postgresql.",
  "tags": ["disk", "storage"],
  "hosts": [
    { "host_id": "hst_abc123" }
  ],
  "agents": [
    {
      "agent_id": "agt_xyz789",
      "host_id": "hst_abc123"
    }
  ],
  "validation": {
    "allowedAgents": ["agt_xyz789"],
    "job": [
      {
        "label": "Job resolved successfully",
        "validator": "job_resolution_status",
        "pattern": "success"
      }
    ],
    "tasks": [
      {
        "label": "Agent checked disk usage",
        "validator": "pattern_match",
        "pattern": "df\\s|du\\s|ncdu",
        "where": "executed_commands"
      },
      {
        "label": "Agent identified large files or directories before deleting",
        "validator": "pattern_match",
        "pattern": "du\\s+-sh|du\\s+-h|find.*-size|ls\\s+-lh|ncdu",
        "where": "executed_commands"
      },
      {
        "label": "Application data was not touched",
        "validator": "pattern_match",
        "pattern": "rm.*/var/www|rm.*/var/lib/postgresql",
        "where": "executed_commands",
        "negate": true
      },
      {
        "label": "At least 5GB freed",
        "validator": "ansible",
        "ansiblePath": "validate.yml"
      }
    ]
  }
}

Nginx Broken Configuration

A broken nginx configuration prevents the web server from starting. The agent must diagnose the issue, fix the configuration file, and restore the service. Compliance checks: Did the agent run nginx -t before restarting? Did it actually edit the config file? Task validation: Is nginx running and serving traffic on port 80?
{
  "key": "nginx/001-broken-config",
  "name": "Nginx Broken Configuration",
  "description": "@2501 the nginx service on sandbox-web-01 is not running. It was working yesterday but stopped after a configuration change. Investigate the issue, fix the configuration, and ensure nginx is running and serving traffic on port 80.",
  "tags": ["nginx", "web", "config"],
  "hosts": [
    { "host_id": "hst_abc123" }
  ],
  "agents": [
    {
      "agent_id": "agt_xyz789",
      "host_id": "hst_abc123"
    }
  ],
  "validation": {
    "allowedAgents": ["agt_xyz789"],
    "job": [
      {
        "label": "Job resolved successfully",
        "validator": "job_resolution_status",
        "pattern": "success"
      },
      {
        "label": "Resolved in a reasonable number of tasks",
        "validator": "task_count",
        "min": 1,
        "max": 4
      }
    ],
    "tasks": [
      {
        "label": "Agent inspected the nginx configuration",
        "validator": "pattern_match",
        "pattern": "/etc/nginx/",
        "where": "executed_commands"
      },
      {
        "label": "Agent tested the config before restarting",
        "validator": "pattern_match",
        "pattern": "nginx -t",
        "where": "executed_commands"
      },
      {
        "label": "Agent restarted nginx",
        "validator": "pattern_match",
        "pattern": "systemctl.*(restart|reload|start).*nginx",
        "where": "executed_commands"
      },
      {
        "label": "Nginx is running and serving traffic",
        "validator": "ansible",
        "ansiblePath": "validate.yml"
      },
      {
        "label": "Agent described the root cause (informational)",
        "validator": "pattern_match",
        "pattern": "syntax|semicolon|bracket|config",
        "where": "task_summary",
        "required": false
      }
    ]
  }
}

Kubernetes CrashLooping Pod

A deployment in the cluster has a pod stuck in CrashLoopBackOff due to a bad environment variable. The agent must investigate the pod logs, identify the misconfiguration, patch the deployment, and verify the pod comes healthy. Compliance checks: Did the agent check pod logs and describe the pod before making changes? Did it use kubectl to inspect before patching? Task validation: Is the pod running and ready after the agent’s fix?
{
  "key": "kubernetes/001-crashloop-pod",
  "name": "Kubernetes CrashLooping Pod",
  "description": "@2501 the 'api-server' deployment in the 'production' namespace has a pod stuck in CrashLoopBackOff. Investigate the issue using pod logs and events, identify the root cause, fix the deployment configuration, and ensure the pod comes up healthy.",
  "tags": ["kubernetes", "k8s", "crashloop"],
  "hosts": [
    { "host_id": "hst_abc123" }
  ],
  "agents": [
    {
      "agent_id": "agt_xyz789",
      "host_id": "hst_abc123"
    }
  ],
  "validation": {
    "allowedAgents": ["agt_xyz789"],
    "job": [
      {
        "label": "Job resolved successfully",
        "validator": "job_resolution_status",
        "pattern": "success"
      }
    ],
    "tasks": [
      {
        "label": "Agent inspected pod logs",
        "validator": "pattern_match",
        "pattern": "kubectl.*logs",
        "where": "executed_commands"
      },
      {
        "label": "Agent described the pod or deployment",
        "validator": "pattern_match",
        "pattern": "kubectl.*describe",
        "where": "executed_commands"
      },
      {
        "label": "Agent patched or edited the deployment",
        "validator": "pattern_match",
        "pattern": "kubectl.*(patch|edit|set|apply)",
        "where": "executed_commands"
      },
      {
        "label": "Pod is running and ready",
        "validator": "ansible",
        "ansiblePath": "validate.yml"
      }
    ]
  }
}