Skip to main content
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.
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.
VariableTypeDescriptionExample
.NamestringHuman-readable name of the trigger. Use this in messages to identify which trigger fired.”Deflector Shield Overload”
.IDstringUnique identifier for the trigger. Useful for programmatic references or deduplication.”JwwZxfcP5kH”
.DescriptionstringShort 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.”
.URLstringDirect 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"
.EnvironmentstringName of the Honeycomb environment where the trigger is defined. Useful for scoping alerts to the correct context.”test”
.DatasetsarrayList 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"]
.OperatorstringComparison operator used to evaluate the trigger condition.”less than or equal to”
.ThresholdfloatNumeric threshold value that, when exceeded or met, causes the trigger to fire.1.5
.FrequencyintegerHow often the trigger is evaluated, in minutes.15
.Query.TimeRangeintegerDuration of the query that the trigger uses for evaluation, in seconds.60
.Result.URLstringDirect 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.GroupsarrayGroups included in the trigger evaluation. For correct formatting, wrap array variables with toJSON.
.Result.GroupsTriggeredarrayGroups that met or exceeded the trigger threshold. For correct formatting, wrap array variables with toJSON.
.Result.Groups[0].Group.KeystringColumn name used for grouping results. Helps identify which metric or dimension caused the trigger.”endpoint”
.Result.Groups[0].Group.ValueanyValue of the grouping column for this group.”/1/example/endpoint”
.Result.Groups[0].ResultfloatQuery result for this specific group. Can be included in alert messages to show actual values.10
.Alert.InstanceIDstringUnique identifier for this specific trigger firing. Useful for deduplication or correlating alerts.”c0fd570f-e920-4022-96d2-39e7df3e0621”
.Alert.DescriptionstringShort 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.StatusstringStatus of the trigger. Possible values include: "TRIGGERED" (indicates the condition was met), "OK" (means it is normal).”TRIGGERED”
.Alert.SummarystringConcise summary of the alert suitable for notifications or messages.”TEST: Triggered: Rear Deflector Shield Overload”
.Alert.IsTestbooleanIndicates whether this alert firing is a test or a real evaluation.true
.Alert.TimestamptimeTimestamp for the time at which the Trigger was evaluated. Useful for tracking and audit purposes.2024-11-21T16:40:22.896871538Z
.Alert.TypestringType of trigger evaluation. Possible values include: "on_change" (fires when the status changes), "on_true" (fires whenever the condition is true).“on_change”
.Recipient.NamestringName of the person or system receiving the alert.”Primary On Call”
.Recipient.SecretstringShared 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.
VariableTypeDescriptionExample
.NamestringHuman-readable name of the SLO associated with the burn alert. Use this to identify which SLO is impacted.”Diagnostics Check Errors”
.IDstringUnique identifier for this specific burn alert. Useful for programmatic references.”U7nREbqQ3z”
.DescriptionstringShort 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.”
.URLstringDirect 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"
.EnvironmentstringName of the Honeycomb environment where the burn alert is active. Helps scope alerts to the correct context.”test”
.DatasetsarrayList of dataset names associated with the burn alert. For correct formatting, wrap array variables with toJSON.[“test”]
.BudgetRateWindowMinutesintegerTime window used to calculate the budget rate, in minutes.10
.BudgetDecreaseThresholdfloatThreshold of budget decrease rate that triggers this alert.1
.SLO.URLstringDirect 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.IDstringUnique identifier for the associated SLO.”R74738d7”
.SLI.URLstringDirect 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.InstanceIDstringUnique identifier for this instance of the burn alert firing. Useful for deduplication.”c056e6a4-6a76-444d-a475-d4b02569fa26”
.Alert.DescriptionstringBrief explanation of the alert.”Diagnostics Check Errors”
.Alert.StatusstringStatus of the burn alert. Possible values include: "TRIGGERED" (indicates the budget rate threshold was exceeded), "OK" (means it is within limits).”TRIGGERED”
.Alert.SummarystringConcise summary of the alert, suitable for notifications.”Triggered: Diagnostics Check Errors budget rate is above 5%“
.Alert.IsTestbooleanIndicates whether this alert was generated during a test run.true
.Alert.TimestamptimeTimestamp of the time when the burn alert was evaluated. Useful for auditing and tracking.2024-11-21T16:40:22.896871538Z
.Alert.BudgetDecreasefloatRate of budget decrease at the time the alert fired.1.34
.Recipient.NamestringName of the person of system receiving this alert.”Primary On Call”
.Recipient.SecretstringShared 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.
VariableTypeDescriptionExample
.NamestringHuman-readable name of the SLO tied to this burn alert. Helps identify which SLO may be at risk.”Diagnostics Check Errors”
.IDstringUnique identifier for this specific burn alert. Useful for referencing programmatically.”U7nREbqQ3z”
.DescriptionstringShort 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.”
.URLstringDirect 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"
.EnvironmentstringName of the Honeycomb environment where the burn alert is active.”test”
.DatasetsarrayList of dataset names associated with the burn alert. For correct formatting, wrap array variables with toJSON.[“test”]
.ExhaustionMinutesintegerConfigured amount of time until the SLO budget is projected to be exhausted, in minutes.60
.SLO.URLstringDirect 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.IDstringUnique identifier for the SLO associated with this burn alert.”R74738d7”
.SLI.URLstringDirect 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.InstanceIDstringUnique identifier for this instance of the burn alert firing. Can be used to deduplicate alerts.”c056e6a4-6a76-444d-a475-d4b02569fa26”
.Alert.DescriptionstringShort explanation of the alert event.”Diagnostics Check Errors”
.Alert.StatusstringStatus of the burn alert. Possible values include: "TRIGGERED" (exhaustion is approaching), "OK" (the SLO is within budget).”TRIGGERED”
.Alert.SummarystringConcise summary of the alert, useful for notifications.”Triggered: Diagnostics Check Errors will violate SLO in 1h”
.Alert.IsTestbooleanIndicates if the alert firing occurred during a test.true
.Alert.TimestamptimeTimestamp of the time when the burn alert was evaluated.2024-11-21T16:40:22.896871538Z
.Alert.BudgetDecreasefloatRate at which the SLO budget was being consumed at the time the alert fired.1.34
.Recipient.NamestringName of the person or system receiving the alert.”Primary On Call”
.Recipient.SecretstringShared secret of the recipient. Useful if you need to include authorization in the request body.”some-shared-secret”