Creating Runbooks
This guide walks through creating a runbook β from defining a trigger condition to configuring notification channels and testing the workflow.
Step 1: Choose a Trigger
Runbooks start with an alert trigger. You can attach a runbook to an existing alert rule or create a new one. Navigate to Alerts β Alert Rules and click Attach Runbook on an existing rule, or create a new rule and select Create Runbook.
Triggers can be based on:
- Cost thresholds (e.g., daily spend exceeds $X)
- Resource state changes (e.g., EC2 instance terminated unexpectedly)
- Sync failures (e.g., provider sync fails 3 consecutive times)
- Custom metric thresholds
Step 2: Define Steps
Steps execute in order when the runbook is triggered. Each step is one of:
- API Call β call an external service or internal API
- Notification β send a message via email, Slack, or webhook
- Data Fetch β pull additional context from a provider
- Log Entry β create an audit trail entry
If a step fails, you can configure the runbook to halt, skip to the next step, or retry up to a specified number of times.
Step 3: Configure Notifications
Add notification channels to keep your team informed. Each channel defines:
- Channel type β email, Slack, or webhook
- Recipients β email addresses, Slack channel, or webhook URL
- Trigger point β notify on runbook start, completion, failure, or all three
See Notification Channels for configuration details.
Step 4: Test Your Runbook
Before relying on a runbook in production, test it with a manual trigger. From the runbook editor, click Test Run. CloudInfraOS executes all steps and shows the results without sending actual notifications.
Execution and Monitoring
Once active, each runbook execution is recorded in the Runbook Executionslog. You can see which trigger fired, how long each step took, whether steps succeeded or failed, and any error details. Use this data to refine your runbooks over time.