Create Runbook Triggers
Creating Triggers
- Step by Step
- Interactive Guide
Step 1: Access Trigger Configuration
- Open your existing runbook in the Harness AI SRE platform
- Click the Triggers tab in your runbook editor
- This opens the trigger configuration interface
Step 2: Create New Trigger
- Click + New Trigger to begin the trigger setup process
- This opens the trigger creation wizard
Step 3: Choose Trigger Template
- Select the Incident Type template from the available options
- Choose the specific Incident Type from the dropdown menu
- The selected incident type determines which fields and values will be available for condition configuration
- This selection affects what data you can use when setting up trigger conditions
Step 4: Define Trigger Conditions
- Choose Condition Type: Select either ALL or ANY for your condition logic:
- ALL: All conditions must be met for the trigger to activate
- ANY: Any one of the conditions can activate the trigger
- Set Frequency: Choose when the trigger should evaluate:
- Activity Created: Trigger when new incidents are created
- Activity Updated: Trigger when incidents are updated
- Key Event Created: Trigger when key events are added to incidents
- Add Conditions: Click to add specific field-based conditions for more precise triggering
Step 5: Configuring Additional Conditions
To add more specific conditions beyond the basic frequency setting:
- Select Field: Choose the incident field you want to monitor from the dropdown
- Fields available depend on the incident type selected in Step 3
- Options include standard incident fields and custom fields for that incident type
- Choose Comparison Type: Select what aspect of the field to monitor:
- Old Values: Compare against the previous value of the field
- New Values: Compare against the current/new value of the field
- Changed Field: Trigger when the field value changes (regardless of specific values)
- Select Comparator: Choose how to compare the field value:
- Equals: Exact match with the specified value
- Contains: Field contains the specified text
- Greater Than/Less Than: Numeric comparisons
- Other operators: Based on field type and requirements
- Enter Value: Provide the value to compare against
- Repeat: Add multiple conditions as needed using the ALL/ANY logic set in Step 4
Step 6: Save and Activate
- Review Configuration: Verify all trigger settings are correct
- Save Trigger: Click Save to create the trigger
- Test Trigger: Test the trigger by creating dummy conditions that match your configuration
- Monitor Execution: Track trigger performance and effectiveness once activated
Follow this interactive guide to configure triggers that automatically execute your runbooks based on specific conditions and events.
Severity Field Values
Harness AI SRE uses numeric string values for severity levels. When configuring trigger conditions, use these exact string values:
| Value | Label | Severity Level |
|---|---|---|
"0" | SEV0:Critical | Highest severity |
"1" | SEV1:Major | High severity |
"2" | SEV2:Moderate | Moderate severity |
"3" | SEV3:Minor | Low severity |
"4" | SEV4:Cosmetic | Lowest severity |
Example trigger condition:
To trigger on critical incidents, use:
severity = "0"
To trigger on major incidents, use:
severity = "1"
Supported Comparison Operators
Because severity values are strings, only certain comparison operators work correctly.
Supported operators for severity (string field):
=(Equals): Match exact severity level!=(Does not equal): Match all except specified severity levelCONTAINS: Match if severity string contains specified textDOES_NOT_CONTAIN: Match if severity string does not contain specified text
Unsupported operators for severity (string field):
>(Greater than): Does not work with string values<(Less than): Does not work with string values>=(Greater than or equal to): Does not work with string values<=(Less than or equal to): Does not work with string values
You cannot use severity > "2" to match SEV0 and SEV1. This comparison will not work because severity is stored as a string, not a number.
Match Multiple Severity Levels
To trigger on multiple severity levels (for example, SEV0 OR SEV1), use one of these approaches:
Option 1: Multiple conditions with OR logic
Create separate conditions and set the condition match type to Match Any (OR):
- Add first condition:
severity = "0" - Add second condition:
severity = "1" - Set match type to Match Any (OR)
The trigger will activate when the incident severity is either "0" or "1".
Option 2: Multiple triggers
Create separate triggers for each severity level within the same runbook assignment. Each trigger handles one severity level independently.
Alternative Severity Naming Conventions
The system accepts alternative severity names from integrations like FireHydrant and PagerDuty. These values are automatically mapped to numeric severity strings:
| Alternative Names | Mapped Value |
|---|---|
SEV0, SECURITY0, CUSTOMER-P0 | "0" |
SEV1, INTERNAL-PROD, SECURITY1, CUSTOMER-P1 | "1" |
SEV2, DEPLOYMENT, SECURITY2 | "2" |
SEV3, INTERNAL-NONPROD, MAINTENANCE | "3" |
| Any other value | "4" |
When incidents are created from external integrations, the severity value is normalized to the numeric string format automatically.
Next steps
Now that you have created a trigger, you can configure advanced logic and test your automation.
- Go to Use CEL Expressions in Runbook Triggers to use CEL for advanced trigger conditions
- Go to Advanced Trigger Scenarios to learn about complex trigger patterns
- Go to Troubleshooting Triggers to resolve common trigger issues
Need Help? Contact our support team by email at support@harness.io or visit the Harness Documentation for additional resources and troubleshooting guides.