Skip to main content

Create a Runbook Trigger

Triggers determine when and how your runbooks execute automatically in Harness AI SRE. Proper trigger configuration ensures your runbooks respond to the right conditions at the right time, enabling seamless automation for incident response and operational workflows.

Overview

Runbook triggers help you:

  • Automate runbook execution based on specific conditions
  • Respond to incidents, alerts, and key events automatically
  • Set up event-driven workflows for faster incident resolution
  • Configure conditional logic to prevent unnecessary executions
  • Establish reliable automation that scales with your operations

Trigger Configuration Basics

Runbook triggers can be created based on various conditions and events. The trigger system allows you to:

  • Incident-Based Automation: Execute runbooks when incidents are created, updated, or when specific field changes occur
  • Key Event Responses: Trigger runbooks when key events are created in the incident timeline
  • Conditional Logic: Use ALL or ANY condition types with field comparisons to create precise trigger criteria
  • Field-Specific Triggers: Monitor changes to specific incident fields and trigger based on old values, new values, or field changes

Best Practices for Trigger Creation

Consider these scenarios when creating runbook triggers:

  • Incident Severity Changes: Trigger escalation runbooks when incident severity increases
  • Assignment Changes: Execute notification runbooks when incidents are assigned to specific teams
  • Status Updates: Activate communication runbooks when incident status changes to resolved
  • Key Milestones: Trigger documentation runbooks when key events are added to incident timelines

Creating Triggers

Follow this interactive guide to configure triggers that automatically execute your runbooks based on specific conditions and events.

Trigger Configuration Best Practices

Design Principles

  • Specific Conditions: Create precise trigger conditions to avoid false positives
  • Logical Grouping: Organize related triggers for easier management
  • Performance Optimization: Design efficient conditions that don't overload the system
  • Clear Naming: Use descriptive names that clearly indicate trigger purpose

Operational Excellence

  • Avoid Trigger Overlap: Ensure multiple runbooks don't trigger simultaneously for the same event
  • Use Appropriate Delays: Add delays between related triggers to prevent conflicts
  • Test Thoroughly: Validate trigger conditions in non-production environments first
  • Monitor Execution: Track trigger effectiveness and adjust conditions as needed

Security Considerations

  • Access Control: Ensure triggers have appropriate permissions for their actions
  • Data Validation: Validate all input data before trigger execution
  • Audit Logging: Maintain comprehensive logs of trigger activations
  • Error Handling: Implement robust error handling for failed trigger executions

Advanced Trigger Scenarios

Multi-Condition Triggers

Configure complex triggers that respond to multiple conditions:

  • Incident Severity + Service: Trigger only for high-severity incidents affecting critical services
  • Time + Alert Volume: Activate during business hours when alert volume exceeds thresholds
  • Team Assignment + Escalation: Execute when incidents are escalated to specific teams

Conditional Execution

Implement smart trigger logic:

  • Environment-Specific: Different triggers for production vs. development environments
  • Service-Aware: Triggers that behave differently based on affected services
  • Context-Sensitive: Triggers that adapt based on incident context and history

Troubleshooting Triggers

Common Issues

Trigger Not Activating

  • Solution: Verify trigger conditions match actual event data
  • Prevention: Test triggers with realistic scenarios before deployment

Performance Issues

  • Solution: Optimize trigger conditions and reduce evaluation frequency
  • Prevention: Regular performance monitoring and condition refinement

Integration with Key Events

Key Event Trigger Configuration

When using Key Events as trigger sources:

  1. Set Trigger Condition: In the Triggers section, set the condition to "Key Event Created"
  2. Map Event to Input: Configure how event data maps to runbook input variables
  3. Dynamic Execution: Enable automatic execution when specified Key Events occur
  4. Data Validation: Ensure event data meets runbook input requirements

This approach allows for seamless integration between event detection and automated response, without requiring manual configuration of input variables for each execution.

Benefits

  • Automated Response: Immediate response to incidents and alerts without manual intervention
  • Consistent Execution: Standardized response procedures triggered by specific conditions
  • Scalable Operations: Handle increasing incident volumes without additional manual effort
  • Reduced MTTR: Faster incident resolution through automated trigger-based responses
  • Operational Efficiency: Free up team members to focus on complex issues requiring human intervention
  • Audit Trail: Complete tracking of automated actions and their triggers
  • Flexible Configuration: Adapt trigger behavior to changing operational requirements

Next Steps

Getting Started

Advanced Configuration

Best Practices Resources


info

Need Help? Contact our support team or visit the Harness Documentation for additional resources and troubleshooting guides.