Skip to content

Define a Destination

When setting up a specific alert definition, you can configure your notification settings. These settings allow you to designate destinations for notifications using Notification Center. A destination consists of a pre-configured connector and preset, and any specific customizations made to these configurations in the context of the alert definition. These customizations, known as overrides, will not affect the global connector and preset configurations in the Notification Center, allowing you to adjust notification settings at the alert definition level.

Getting started

To define a destination for notifications, go to Destinations and click on + Add destination.

Select the connector type & connector

In the Send to field, click the dropdown menu, and choose the icon for your preferred connector type (e.g., Slack, HTTP, PagerDuty). Then, select the desired connector from the list of available connectors under that connector type.

Upon selecting a connector, the remaining fields will be automatically populated with the default settings defined in the connector.

Note

If you select a connector type like Slack, a Channel field will appear. You may keep the default channel as is or modify it, including with dynamic templating that allows for dynamic routing. Find out more in Dynamic Routing for Slack Connector Type.

Preset configuration

Select a preset

When configuring your destination, the Preset field will automatically be populated with your default preset configuration. You can click on the dropdown menu to select another preset from available options, which include both system and custom presets.

View preset templates

To view preset templates within the alert definition, click the downward-facing arrow to expand the section. This will display the template content for each field in the schema, including both triggered and resolved subtypes. For Slack, you can switch between raw and structured output types. If needed, you can also view the preset outside the alert definition by navigating to the preset itself using the preset arrow.

Each structured template includes a description of the notification source from which it is inheriting its content.

Override preset templates

To override the content of a preset template, click the pen icon. Once you do this, the preset will be detached from its source and the customization will apply only to this specific alert definition.

To revert the changes, simply click the pen icon again.

Dynamic routing with channel selection

The Channel field is dynamic and can be templated. It defines where the notification is sent within the connector. You can either use the channel defined in the connector or specify a new channel to override the connector's parameters.

Preset content

For each connector, select the preset you want to use for the notification. You can expand or collapse the preset content to view and modify the message configuration. You may override the triggered and resolved schemas specifically for the alert definition, without impacting the global preset setup in Notification Center.

Test your preset

To ensure your preset is correctly configured, click Test preset. When you do, Coralogix renders all the templates in the preset using the example event and sends the notification to the selected connector. If there are any errors in the templates or rendered values, the testing will fail. If everything is set up properly, you’ll receive a test notification to verify that the preset works as expected.

Dynamic routing with the Slack connector type

If you select the Slack connector type, a Channel field will appear. You may keep the default channel as is or modify it, including with dynamic templating that allows for dynamic routing.

  • Default channel: By default, this field will inherit the channel configured in the connector.

  • Custom channel: To use a different channel, click the pen icon to manually edit the channel. Once edited, it will no longer inherit the default channel settings from the connector. You can either specify a static channel (e.g., team1-interface) or use variables for dynamic routing (e.g., {{alert.groups[0].keyValues.teamId}}-interface) using Tera templating.

Note

If you would like the dynamic routing to apply to all alert-based notifications sent to the Slack connector type, we recommend configuring dynamic routing as part of the Notification Center connector setup.

Dynamic routing examples

Dynamic routing allows you to customize where alerts are routed based on specific conditions, utilizing alert data.

Example 1: Using alert priority

{{alertDef.priority}}-interface
  • This configuration dynamically inserts the priority of an alert into the channel name.

  • The {{alertDef.priority}} placeholder retrieves the priority level from the alert definition (alertDef).

  • The notification is sent to a channel with the format: priority-interface (e.g., high-interface, medium-interface).

Example 2: Routing based on the first group’s team ID

{{alert.groups[0].keyValues.teamId}}-interface

This configuration dynamically routes notifications based on the team ID found in the first alert group.

The placeholder {{alert.groups[0].keyValues.teamId}} retrieves the teamId value from the first group in the alert.

The resulting notification channel follows the format: teamId-interface (e.g., engineering-interface, security-interface).

Example 3: Using team name when a naming standard exists

[{{...teamName | lower | replace(from=' ', '')}}-interface]

This ensures the team name is formatted correctly by:

  • Converting it to lowercase (lower).

  • Replacing spaces with an empty string (replace(from=' ', '')).

The resulting notification channel follows the format: teamname-interface (e.g., devops-interface).

Example 4: Using team name when no naming standard exists

{% set first_group = alert.groups | first %}
{% if first_group is object %}
    {% set team_name = first_group.keyValues | get(key='Team', default='-') %}
{% else %}
    {% set team_name = "-" %}
{% endif %}
{% if team_name == "Supply" %}
    supply-alerts
{% elif team_name == "Billing" %}
    billing-alerts
{% else %}
    techsupport_alerts
{% endif %}

This script determines the notification channel based on the team name in the alert metadata.

If a recognized team name is found, the alert is sent to a predefined channel:

  • "Supply"supply-alerts

  • "Billing"billing-alerts

If no matching team name exists, the alert defaults to techsupport_alerts.

Add additional destinations

If you want to send the notification to multiple destinations, click + Add destination to add another destination to your alert definition.