Message FormattingΒΆ
These actions are useful for creating notifications or customising the output of existing actions.
To control where these notifications are sent, refer to Notification Basics.
Create findingΒΆ
Create findingΒΆ
Playbook Action: create_finding
Create a new notification message. This is the primary way that custom playbooks generate messages.
Add this to your Robusta configuration (Helm values.yaml):
customPlaybooks:
- actions:
- create_finding:
aggregation_key: JobFailure
severity: DEBUG
title: 'Job $name (importance: $labels.importance) in namespace $namespace failed'
triggers:
- on_job_failure: {}
The above is an example. Try customizing the trigger and parameters.
- title (str)
Finding title. Title can be templated with name/namespace/kind/node of the resource, if applicable.
Additionally, templating with labels and annotations of the resource is supported via $labels.label_name and $annotations.annotation_name.
- aggregation_key (str)
Aggregation Keys are used for grouping similar types of notifications together.
For example, all CrashLoopBackOff notifications should have the same Aggregation Key so that Sinks can group them together.
Generally, each instance of create_finding in your playbooks should specify a unique Aggregation Key, like "Crashing Pod" or "OOMKill".
Aggregation Keys should generally not include Pod names or other strings that change. If you include dynamic data in the Aggregation Key, each unique Aggregation Key will create itβs own grouping.
- description (str)
Finding description. Description can be templated
- severity (str) = HIGH
Finding severity. Allowed values: DEBUG, INFO, LOW, MEDIUM, HIGH
This action can be manually triggered using the Robusta CLI:
robusta playbooks trigger create_finding title=TITLE aggregation_key=AGGREGATION_KEY
Create event findingΒΆ
Playbook Action: create_event_finding
Create a new notification message based on a Kubernetes event fields. Specifically, based on the reason, messsage, and the resource related to the event
Add this to your Robusta configuration (Helm values.yaml):
customPlaybooks:
- actions:
- create_event_finding:
aggregation_key: string
triggers:
- on_event_create: {}
The above is an example. Try customizing the trigger and parameters.
- aggregation_key (str)
on_kubernetes_warning_event_delete
Finding attributesΒΆ
Customise findingΒΆ
Playbook Action: customise_finding
Modify an existing notification message generated by a previous playbook action. This lets you modify messages created by other actions without needing to rewrite those actions.
This action does not create a new Finding, it just overrides the attributes of an existing Finding. It must be placed as the last action in the playbook configuration, to override the attributes created by previous actions
Add this to your Robusta configuration (Helm values.yaml):
customPlaybooks:
- actions:
- customise_finding:
severity: DEBUG
title: Resource $kind/$namespace/$name is in trouble
triggers:
- on_pod_crash_loop: {}
The above is an example. Try customizing the trigger and parameters.
- title (str)
Overriding finding title. Title can be templated with name/namespace/kind/node of the resource, if applicable
- description (str)
Overriding finding description. Description can be templated with name/namespace/kind/node of the resource, if applicable
- severity (str)
Overriding finding severity. Allowed values: DEBUG, INFO, LOW, MEDIUM, HIGH
- aggregation_key (str)
This action can be manually triggered using the Robusta CLI:
robusta playbooks trigger customise_finding