Custom Webhook Variables

Customize Honeycomb alerts with variables for precise, actionable notifications.

Introduction 

Use variables to customize payloads for your Honeycomb trigger alerts and SLO burn alerts. These variables dynamically populate your webhook payloads, ensuring that alerts contain the relevant information for your workflows.

To learn more about working with variables in custom webhooks, visit Custom Webhooks: Define Payload Template Variables and Custom Webhooks: Override Payload Template Variables.

Simple Example 

You can reference a variable in a JSON payload template like this:

{ 
  "message": "{{ .Alert.Summary }}"
}

In this example, .Alert.Summary is a variable that dynamically evaluates to the summary of the alert when the webhook is sent.

Array Variables 

When using variables that return arrays, wrap them with toJson to generate valid JSON:

{
 "datasets": {{ toJson .Datasets }}
}

In this example, the .Datasets variable contains a list of dataset names associated with the alert. Wrapping the variable with toJSON ensures proper JSON formatting.

Note
Omitting toJson for array variables will trigger an error like: Failed to send: invalid character 'e' in literal true (expecting 'r').

Variables for Triggers 

Trigger variables provide contextual information about alerts. Use them to customize payloads for your integrations.

Variable Type Description Example
.Name string Human-readable name of the trigger. Use this in messages to identify which trigger fired. “Deflector Shield Overload”
.ID string Unique identifier for the trigger. Useful for programmatic references or deduplication. “JwwZxfcP5kH”
.Description string Short summary of the trigger. We suggest including what it monitors and why it exists. Helps recipients understand context. “One or more deflector shields are overloaded. Consider diverting power from other shields to compensate. See YT-1300 Operations Manual page 167 for diagnostics.”
.URL string Direct link to the trigger’s detail page in the Honeycomb UI. Allows quick access for troubleshooting or investigation. "https://ui.honeycomb.test/rebel-alliance/environments/test/datasets/falcon/triggers/4a77775a78666350356b48"
.Environment string Name of the Honeycomb environment where the trigger is defined. Useful for scoping alerts to the correct context. “test”
.Datasets array List of dataset names monitored by the trigger. Can be used to include dataset context in alerts. For correct formatting, wrap array variables with toJSON. ["test"]
.Operator string Comparison operator used to evaluate the trigger condition. “less than or equal to”
.Threshold float Numeric threshold value that, when exceeded or met, causes the trigger to fire. 1.5
.Frequency integer How often the trigger is evaluated, in minutes. 15
.Query.TimeRange integer Duration of the query that the trigger uses for evaluation, in seconds. 60
.Result.URL string Direct link to the query result that caused the alert. Useful for viewing data behind the trigger. "https://ui.honeycomb.test/rebel-alliance/environments/test/datasets/falcon/result/4656626d79/a/6e694854a6241"
.Result.Groups array Groups included in the trigger evaluation. For correct formatting, wrap array variables with toJSON.
.Result.GroupsTriggered array Groups that met or exceeded the trigger threshold. For correct formatting, wrap array variables with toJSON.
.Result.Groups[0].Group.Key string Column name used for grouping results. Helps identify which metric or dimension caused the trigger. “endpoint”
.Result.Groups[0].Group.Value any Value of the grouping column for this group. “/1/example/endpoint”
.Result.Groups[0].Result float Query result for this specific group. Can be included in alert messages to show actual values. 10
.Alert.InstanceID string Unique identifier for this specific trigger firing. Useful for deduplication or correlating alerts. “c0fd570f-e920-4022-96d2-39e7df3e0621”
.Alert.Description string Short summary of the alert. We suggest including which groups or values caused it to fire. “test environment:\nCurrently less than or equal to threshold value (less than or equal to) for location: rear (value 0), location: port (value 0)”
.Alert.Status string Status of the trigger. Possible values include: "TRIGGERED" (indicates the condition was met), "OK" (means it is normal). “TRIGGERED”
.Alert.Summary string Concise summary of the alert suitable for notifications or messages. “TEST: Triggered: Rear Deflector Shield Overload”
.Alert.IsTest boolean Indicates whether this alert firing is a test or a real evaluation. true
.Alert.Timestamp time Timestamp for the time at which the Trigger was evaluated. Useful for tracking and audit purposes. 2024-11-21T16:40:22.896871538Z
.Alert.Type string Type of trigger evaluation. Possible values include: "on_change" (fires when the status changes), "on_true" (fires whenever the condition is true). “on_change”
.Recipient.Name string Name of the person or system receiving the alert. “Primary On Call”
.Recipient.Secret string Shared secret of the recipient. Useful if you need to include authorization in the request body. “some-shared-secret”

Variables for SLO Budget Rate Burn Alerts 

These variables provide information about SLO burn alerts for monitoring error budget consumption.

Variable Type Description Example
.Name string Human-readable name of the SLO associated with the burn alert. Use this to identify which SLO is impacted. “Diagnostics Check Errors”
.ID string Unique identifier for this specific burn alert. Useful for programmatic references. “U7nREbqQ3z”
.Description string Short summary of the burn alert. We suggest including why the burn alert exists and what it monitors. Helps recipients understand the alert context. “Many diagnostics checks are failing. If this continues, critical systems may go offline. BubbleUp on component to understand failures.”
.URL string Direct link to the burn alert’s detail page in the Honeycomb UI. Allows quick access for investigation. "https://ui.honeycomb.test/rebel-alliance/environments/test/datasets/falcon/slos/burn_alerts/55376e5245627151337a"
.Environment string Name of the Honeycomb environment where the burn alert is active. Helps scope alerts to the correct context. “test”
.Datasets array List of dataset names associated with the burn alert. For correct formatting, wrap array variables with toJSON. [“test”]
.BudgetRateWindowMinutes integer Time window used to calculate the budget rate, in minutes. 10
.BudgetDecreaseThreshold float Threshold of budget decrease rate that triggers this alert. 1
.SLO.URL string Direct link to the associated Service Level Objective (SLO) in the Honeycomb UI. Useful for deeper investigation. "https://ui.honeycomb.test/rebel-alliance/environments/test/datasets/falcon/slo/6a373935455846566a4844"
.SLO.ID string Unique identifier for the associated SLO. “R74738d7”
.SLI.URL string Direct link in the Honeycomb UI to Service Level Indicator (SLI) underlying the SLO. "https://ui.honeycomb.test/rebel-alliance/environments/test/datasets/falcon/schema?dc=sli.diagnostics"
.Alert.InstanceID string Unique identifier for this instance of the burn alert firing. Useful for deduplication. “c056e6a4-6a76-444d-a475-d4b02569fa26”
.Alert.Description string Brief explanation of the alert. “Diagnostics Check Errors”
.Alert.Status string Status of the burn alert. Possible values include: "TRIGGERED" (indicates the budget rate threshold was exceeded), "OK" (means it is within limits). “TRIGGERED”
.Alert.Summary string Concise summary of the alert, suitable for notifications. “Triggered: Diagnostics Check Errors budget rate is above 5%”
.Alert.IsTest boolean Indicates whether this alert was generated during a test run. true
.Alert.Timestamp time Timestamp of the time when the burn alert was evaluated. Useful for auditing and tracking. 2024-11-21T16:40:22.896871538Z
.Alert.BudgetDecrease float Rate of budget decrease at the time the alert fired. 1.34
.Recipient.Name string Name of the person of system receiving this alert. “Primary On Call”
.Recipient.Secret string Shared secret of the recipient. Useful if you need to include authorization in the request body. “some-shared-secret”

Variables for SLO Exhaustion Time Burn Alerts 

Use these variables when configuring burn alerts that monitor projected SLO exhaustion time.

Variable Type Description Example
.Name string Human-readable name of the SLO tied to this burn alert. Helps identify which SLO may be at risk. “Diagnostics Check Errors”
.ID string Unique identifier for this specific burn alert. Useful for referencing programmatically. “U7nREbqQ3z”
.Description string Short summary of the burn alert. We suggest including why the burn alert exists and what it monitors. Helps recipients understand the alert context. “Many diagnostics checks are failing. If this continues, critical systems may go offline. BubbleUp on component to understand failures.”
.URL string Direct link to the burn alert page in the Honeycomb UI. Enables quick investigation. "https://ui.honeycomb.test/rebel-alliance/environments/test/datasets/falcon/slos/burn_alerts/55376e5245627151337a"
.Environment string Name of the Honeycomb environment where the burn alert is active. “test”
.Datasets array List of dataset names associated with the burn alert. For correct formatting, wrap array variables with toJSON. [“test”]
.ExhaustionMinutes integer Configured amount of time until the SLO budget is projected to be exhausted, in minutes. 60
.SLO.URL string Direct link to the associated Service Level Objective (SLO). Useful for reference or investigaton. "https://ui.honeycomb.test/rebel-alliance/environments/test/datasets/falcon/slo/6a373935455846566a4844"
.SLO.ID string Unique identifier for the SLO associated with this burn alert. “R74738d7”
.SLI.URL string Direct link to the Service Level Indicator (SLI) driving this SLO. "https://ui.honeycomb.test/rebel-alliance/environments/test/datasets/falcon/schema?dc=sli.diagnostics"
.Alert.InstanceID string Unique identifier for this instance of the burn alert firing. Can be used to deduplicate alerts. “c056e6a4-6a76-444d-a475-d4b02569fa26”
.Alert.Description string Short explanation of the alert event. “Diagnostics Check Errors”
.Alert.Status string Status of the burn alert. Possible values include: "TRIGGERED" (exhaustion is approaching), "OK" (the SLO is within budget). “TRIGGERED”
.Alert.Summary string Concise summary of the alert, useful for notifications. “Triggered: Diagnostics Check Errors will violate SLO in 1h”
.Alert.IsTest boolean Indicates if the alert firing occurred during a test. true
.Alert.Timestamp time Timestamp of the time when the burn alert was evaluated. 2024-11-21T16:40:22.896871538Z
.Alert.BudgetDecrease float Rate at which the SLO budget was being consumed at the time the alert fired. 1.34
.Recipient.Name string Name of the person or system receiving the alert. “Primary On Call”
.Recipient.Secret string Shared secret of the recipient. Useful if you need to include authorization in the request body. “some-shared-secret”