Overview
Actions define what your Edge Connector executes in response to events. Each action specifies:- Type: Script or HTTP request
- Source Type: Local scripts or Git-based scripts
- Trigger: Which events activate this action
- Parameters: User-configurable inputs (for manual triggers)
- Execution details: Scripts to run or HTTP requests to make
Automatic vs Callable Actions
Edge Connector actions fall into two categories with different behaviors:Automatic Actions (on: Section)
What they are:
- Execute automatically in response to Rootly system events
- Run without user interaction
- Configured in the
on:section where the event type is the key
- Auto-remediation (restart services when alerts fire)
- Notifications (send webhooks when incidents are created)
- Data collection (gather logs when alerts trigger)
- Monitoring integration (sync status to external systems)
- ✅ No
parameter_definitionsneeded (no user input) - ✅ Execute immediately when events occur
- ✅ Registered with backend for visibility/audit
- ✅ Appear in Rootly UI as read-only badges (visible but not clickable)
- ✅ Users can see what automations are configured
- Badge: ”🔄 Script: alert.created” or ”🌐 HTTP: incident.created”
- Read-only display showing what’s automated
- No interaction possible (run automatically only)
Callable Actions (callable: Section)
What they are:
- Triggered manually by users from the Rootly UI
- Require user input via parameter forms
- Configured in the
callable:section where the action slug is the key
- Manual remediation (restart specific services on demand)
- User-initiated operations (deploy hotfixes, scale infrastructure)
- Diagnostic tools (collect logs, run health checks)
- Administrative tasks (clear caches, trigger backups)
- ✅ Require
parameter_definitionsto create UI forms - ✅ Users provide input values before execution
- ✅ Registered with backend to generate UI buttons
- ✅ Appear in Rootly UI as interactive buttons
- ✅ Can be triggered from alerts, incidents, or standalone
- Button: “Restart Service” with form dialog
- Users click → fill out form → submit → action executes
- Real-time execution status and results shown
Comparison Table
Registration Behavior
Both automatic and callable actions are registered with the Rootly backend on connector startup:-
Connector Startup:
- Reads
actions.ymlconfiguration - Sends all actions to
POST /rec/v1/actionsendpoint - Backend syncs actions for this connector
- Reads
-
Backend Processing:
- Automatic actions (no
parameter_definitions):- Stored for visibility and audit
- Displayed as read-only badges in UI
- Users can see what automations exist
- Callable actions (with
parameter_definitions):- UI forms generated from parameter definitions
- Displayed as interactive buttons
- Users can click and provide inputs
- Automatic actions (no
-
Sync Behavior:
- Backend matches actions by slug
- Creates new actions not seen before
- Updates existing actions with new configuration
- Removes actions no longer in config
- Action slug, name, description (for UI display)
- Action type (script or HTTP) and timeout
- Trigger event types
- Parameter definitions (for callable actions only)
- Script paths and execution details
- HTTP URLs, headers, and body templates
- Security settings and environment variables
The presence of
parameter_definitions is what tells the backend whether an action is automatic (read-only) or callable (interactive).Action File Structure
Actions are defined in anactions.yml file with three main sections:
Action Types
Script Actions
Execute scripts from local filesystem or Git repositories.Local Scripts
Execute scripts stored on the Edge Connector host:script: Absolute path to the script to executetimeout: Maximum execution time in secondsparameter_definitions: User inputs when triggered manuallytrigger: Specifies the event type (alert.action_triggered,incident.action_triggered, or defaults toaction.triggered)source_type:local(default) orgit
Git-Based Scripts
Execute scripts from a Git repository that the Edge Connector syncs automatically:script is a path relative to the repository root.
Git Options:
url: Git repository URL (HTTPS or SSH)branch: Branch to checkout (default:main)poll_interval_sec: How often to pull updates (default: 300)
Git-based scripts allow you to version control your automation scripts and update them without redeploying the Edge Connector.
Supported Script Languages
The Edge Connector picks an interpreter from the script’s file extension. Matching is case-insensitive, socheck.PY runs the same as check.py. This applies to both local and Git-based scripts.
The interpreter must be installed on the Edge Connector host and on the
PATH of the user the connector runs as. If it’s missing, the action fails with executable file not found in $PATH.
.shruns withsh, which isdashon Debian and Ubuntu. Use.bashfor scripts that rely on Bash features such as arrays or[[ ]]..ps1looks for a binary namedpowershell. PowerShell 7 on Linux and macOS installs aspwsh, so either add apowershellsymlink topwshor drop the extension and start the script with#!/usr/bin/env pwsh..goneeds the Go toolchain on the host.go runcompiles the file on every execution, and compile time counts toward the action’stimeout.
#!/usr/bin/env python3. The file must be executable, or the action fails with permission denied:
- Local scripts: run
chmod +x /path/to/script. - Git-based scripts: the executable bit must be committed to the repository, since the connector applies the file mode stored in Git. Run
git update-index --chmod=+x path/to/script, which works on any platform and anycore.fileModesetting, then commit and push.
How Scripts Run
Each script action runs as a single command:flags: a map of command-line flags. An empty value or"true"produces--name; any other value produces--name=value. Flag order isn’t guaranteed.args: positional arguments, passed after the flags in the order listed.- Working directory: the directory that contains the script.
- Result: exit code
0marks the execution as completed; any other exit code marks it as failed. Standard output and standard error are reported back to Rootly with the result. A script that exceeds itstimeoutis stopped and reported with exit code-1. stdout/stderr: optional file paths. After a successful run, the connector also writes the captured output to these files.
Script Environment Variables
Scripts inherit the connector’s own environment, plus the following, in increasing order of precedence:security.global_envfromconfig.ymldefaults.envand the action’senvfromactions.yml(the action’s value wins)- One
REC_PARAM_<NAME>variable per parameter
service_name becomes REC_PARAM_SERVICE_NAME. All values are passed as strings.
Allowed Script Paths
Whensecurity.allowed_script_paths in config.yml lists one or more directories, the connector only runs scripts inside them, and any other script fails with script path ... is not within allowed paths. An empty list allows every path.
Git-based scripts are checked against the same list. The connector clones repositories under /tmp/rec-repos, so add that directory to allowed_script_paths when you restrict paths and use Git-based scripts.
HTTP Actions
Make HTTP/HTTPS requests to external APIs or webhooks.url: Target endpoint (supports templates)method: GET, POST, PUT, PATCH, DELETEheaders: HTTP headers (supports templates)params: Query parametersbody: Request body (supports templates for JSON/text)
Action Triggers
Automatic Event Triggers
These actions run automatically when system events occur. They are defined in theon: section where the event type is the key.
Alert Events:
alert.created,alert.updated,alert.acknowledged,alert.resolved,alert.deletedincident.created,incident.updated,incident.in_triage,incident.mitigated,incident.resolved,incident.cancelled,incident.deleted
Automatic triggers do not require
parameter_definitions - they execute automatically with event data.Manual Trigger Events
These actions are triggered manually by users from the Rootly UI. They requireparameter_definitions to create input forms.
Action on Alert:
Parameter Definitions
Parameters create user input forms for manually triggered actions.Parameter Types
String:Use
type: list with options array for dropdown selections. This is preferred over type: string with options for clarity.Parameter Fields
name: Parameter identifier (used in templates as{{ parameters.name }})type: Data type (string, number, boolean)required: Whether input is mandatorydefault: Default value if not providedoptions: List of allowed values (creates dropdown)description: Help text shown in UI
Using Templates in Actions
Actions support Liquid templates for dynamic values. See the Template Syntax guide for detailed documentation.Event Data Templates
Access event data in your action configuration:User Parameter Templates
Access user inputs in manually triggered actions:Environment Variables
Access environment variables securely:Complete Examples
Example 1: Automatic Alert Response
Automatically restart a service when critical alerts are detected:Example 2: Manual Service Scaling
Allow users to manually scale services from incidents:Example 3: Webhook Notification
Send HTTP notification when incidents are mitigated:Example 4: PagerDuty Integration
Create PagerDuty incidents for high-severity Rootly incidents:Best Practices
Security
- Store secrets in environment variables, never in action configuration
- Use absolute paths for scripts to prevent path traversal
- Validate user inputs in your scripts
- Limit script permissions - run with minimal privileges
- Audit action execution logs regularly
Reliability
- Set appropriate timeouts based on expected execution time
- Implement retry logic in your scripts for transient failures
- Handle errors gracefully and return meaningful error messages
- Test actions thoroughly before deploying to production
- Monitor action execution via Rootly dashboard
Configuration
- Use descriptive IDs (snake_case:
restart_production_db) - Provide clear names for UI display
- Write helpful descriptions explaining when to use the action
- Add parameter descriptions to guide users
- Use options for parameters with limited valid values
Templates
- Use
defaultfilter for optional fields:{{ field | default: "N/A" }} - Test templates with sample event data before deploying
- Keep templates simple - complex logic belongs in scripts
- Document template variables in action descriptions
Action Configuration File
Actions are defined in anactions.yml file with three main sections:
defaults:section: Global settings applied to all actions unless overriddenon:section: Automatic actions where event type is the keycallable:section: Manual actions where action slug is the keysource_type:localfor filesystem scripts,gitfor repository-based scriptsparameter_definitions: Create user input forms; auto-accessible as{{ parameters.X }}parameters:section: Adds extra parameters beyond user inputs- Scripts receive all parameters as
REC_PARAM_*environment variables
Next Steps
- See Event Examples for sample event payloads
- Learn Template Syntax for dynamic values
- Review the main Edge Connectors documentation