Skip to main content

Playbook

Fig: Playbooks Page

Spec

FieldDescriptionSchemeRequired
descriptionA short descriptionstringtrue
iconIcon for the playbookstring
onSpecify events to automatically trigger the Playbook. .[]Trigger
runsOnSpecify the runners that can run this playbook. One will be chosen on random. When empty, the playbook will run on the main instance itself[]string
templatesOnSpecify where the templating of the action spec should occurhost or agent
checksSpecify selectors for checks that can be run on the Playbook.[]ResourceSelector
configsSpecify selectors for config items that can be run on the Playbook.[]ResourceSelector
componentsSpecify selectors for component items that can be run on the Playbook.[]ResourceSelector
parametersDefine a set of labeled parameters for the Playbook.[]Parameter
actionsSpecify the set of actions to run.[]Actiontrue
approvalSpecify who can approve runs on this playbook.Approval

Trigger

FieldDescriptionSchemeRequired
canarySetup trigger on canary eventsEventTrigger
componentSetup trigger on health check events.EventTrigger
webhookSetup a webhook endpoint that triggers the playbook.WebhookTrigger

Run

A run is the execution of a Playbook consisting of a sequence of actions. A run can be trigger either

  • manually
  • on events
  • on schedule (upcoming)

For example, a playbook can be executed when a health check passes or fails.

Playbook Runs Fig: Playbooks Runs

Start Time

Every run must have a start time which is the time the run is scheduled to start. By default, the it is set to the current time.

Start time can be in future or even in the past.

Templating

The CEL expression receives a environment variable that contain details about the corresponding config, check or component and the parameter (if applicable).

FieldDescriptionSchema
configConfig passed to the playbookConfigItem
componentComponent passed to the playbookComponent
checkCanary Check passed to the playbookCheck
paramsUser provided parameters to the playbookmap[string]string