Prerequisites
To use the incident.io Alert Source integration, you need:- An incident.io account with permission to create alert sources.
- A LaunchDarkly project with observability features enabled. To learn more, read Observability.
- A LaunchDarkly role that lets you create integration configurations and edit observability alerts.
Create an HTTP alert source in incident.io
Each LaunchDarkly configuration connects to one incident.io HTTP alert source. To learn more about alert sources, read Alert sources in the incident.io documentation. To create an HTTP alert source:- In incident.io, create a new alert source of type HTTP.
- Choose the Default payload format.
- Copy and save the alert source URL for use in the next section. It has the format
https://api.incident.io/v2/alert_events/http/<id>. - Copy and save the alert source bearer token. incident.io shows the token when you create the alert source.
Configure the integration in LaunchDarkly
You can add more than one configuration. For example, add a configuration for each incident.io alert source if you want different alerts to arrive in different sources. To configure the incident.io Alert Source integration:- Click the gear icon in the left sidebar to view Organization settings.
- Click Integrations and find “incident.io Alert Source.”
- Click Add new.
- Enter a Name for the configuration. This name appears in the alert destination menu.
- Paste the Alert source URL you copied from incident.io.
- Paste the Alert source bearer token you copied from incident.io.
- After reading the Terms and Conditions, check the I have read and agree to the Integration Terms and Conditions checkbox.
- Click Save configuration.
https://api.incident.io/v2/alert_events/http/<id>, LaunchDarkly rejects the configuration.
Send alert notifications to incident.io
After you configure the integration, you can add incident.io as a notification destination for any observability alert. The destination menu lists only the incident.io Alert Source configurations that are turned on. To add incident.io as an alert notification destination:- Click Observability > Alerts in the left sidebar.
- Click Create alert, or select Edit alert from an existing alert’s three-dot overflow menu.
- Click + Add notification.
- Click Add incident.io. An “incident.io alert sources” section appears.
- Select one or more configurations from the Select alert sources menu.
- Click Save.
Alert event payload
LaunchDarkly sends each alert event to incident.io in the incident.io HTTP alert source format. The firing event and the resolved event for the same alert group share adeduplication_key. The resolved event closes the incident.io alert that the firing event opened. If the alert uses Group by, each group value produces a separate incident.io alert.
The event contains the following top-level fields:
title: The alert name. If the alert uses grouping, the title also includes the group, such asRequest rate (service=checkout).status: Eitherfiringorresolved.deduplication_key: A stable identifier for the alert and group.description: The alert’s notification message. Resolved events contain a summary of the resolved value instead.source_url: A link to the alert in LaunchDarkly.metadata: Additional information about the alert, described below.
metadata object includes the following fields:
payload_version: The version of the payload format. The current version is1.alert_id,alert_name,project_key, andproject_name: Identifiers for the alert and its LaunchDarkly project.maintainer_team_key: The key of the team that maintains the alert. LaunchDarkly includes this field only when a team maintains the alert.tags: The alert’s tags, as a list of strings. The list is empty if the alert has no tags.product_type,query,reason, andseverity: The data source, query, reason for the notification, and severity of the alert.value,threshold_value,threshold_condition,threshold_type, andthreshold_window_seconds: The observed value and the threshold configuration.group_by_keys,group_by_value, andgroups: The grouping keys and values for the series that triggered the alert.started_atandtimestamp: When the alert started and when LaunchDarkly sent the event.
Route alerts to the owning team
Alert maintainer teams and tags are optional. If an alert has them, then its events also include them, and you can configure incident.io alert routes to send LaunchDarkly alerts to the right team without setting up routing for each alert. For example, in your incident.io alert source, map$.metadata.maintainer_team_key or $.metadata.tags to an alert attribute, then use that attribute in your alert routes. To learn more, read Alert attributes and Alert routing in the incident.io documentation.