Skip to content

title: "Presets" date: "2024-08-07" description: "This tutorial describes how to set up and manage presets for Notification Center." search: exclude: true noindex: true

Presets

Overview

A preset is a collection of fields made of templates making up a message configuration that a connector type or third-party destination can identify. Users create a preset per connector type (e.g., Slack, PagerDuty) and entity type (e.g., alerts).

The preset is a blueprint configuring the data source request to a model compatible with the connector type. Using a particular schema, Notification Center converts the triggered alert into a notification that is received and understood by the connector.

Presets are designed to simplify the reuse of general message configuration components, whether generally applying to an entity type (e.g., alerts) or specific to an entity subtype (e.g., metricThresholdMoreThanTriggered). This allows for flexible and efficient customization as needed.

System presets

Coralogix offers 3 predefined, structured system presets— Basic, Detailed, or Empty for those who want out-of-the-box message configurations.

Preset Description
Basic The default informative option with basic schema elements.
Detailed Includes detailed descriptions of the alert using a large extent of variables from the alert schema.
Empty An empty preset with no predefined content.

Coralogix provides these default notification structures, otherwise known as parent presets. You may view system presets, but they cannot be modified directly.

Custom presets

When you create a preset, it will duplicate a system preset and automatically become a custom preset. At its base, your custom preset will mirror the system preset you have chosen as your default, with each template linked to the system template.

You may keep any templates within the message schema as is or modify them. Once a template is modified, it is unlinked from the system parent preset.

Preset hierarchy

All presets have two layers of hierarchy: a General layer that applies to all entity types (e.g., alerts) and an Override layer to an entity subtype (e.g., Logs-Based Alert Condition: More Than).

In the example below, the user configures a custom preset for Logs-Based Alert with the condition: More than threshold. As part of the preset setup for a particular connector type, the user may modify the default message configuration generally applying to the entity type—all alerts, in this case. This is displayed as the General configuration in the left-hand panel.

The user may also modify the default message configuration that applies exclusively to the entity subtype. An entity subtype comprises an alert type, and status: triggered/resolved. In the example, this appears as a Triggered notification for the Log-Threshold Alert (Condition: More than threshold).

Choose from any of the entity subtypes in the left-hand panel. If your entity subtype does not appear, click + Add override to select the particular subtype of your choosing.

The default template for the entity subtype will mirror the parent system preset for this subtype. As with the entity message configuration, each template in the entity subtype message configuration is linked to the parent system template. You may keep any templates within the message schema as is or modify them. Once a template is modified, it is unlinked from the system parent preset.

When an alert is triggered, the system checks if you have customized any templates within your message schema that apply to an instance of the alert definition that fired. The system will look for applicable templates for the entity type and subtype, from the most specific templates to the most general.

For example, if a Logs-Immediate alert with the notify immediately condition has been triggered, the system will look for applicable templates as follows:

  1. Custom templates specific to the alert subtype (LOGS_IMMEDIATE), then system-based templates specific to alert subtype.
  2. Customized templates common to the entity type (ALERTS), then standard system-based templates common to the entity type.

This prevents duplication when setting up presets, allowing you to reuse the templates that you would like to remain common to all notifications. At the same time, it allows for maximum control over the granularity of notifications when you choose to customize.

Preset output types

Connector-types support particular output types.

Generic HTTPS

For Generic HTTPS, a default output type exists. It consists of the following fields:

Field Description
Header Appears in the notification title
Body Appears at the bottom of the notification

Slack

Structured

Select a structured output type for your connector type by clicking the Structured tab.

The structured output type duplicates the templates from the parent system preset you’ve selected. You may customize any templates in the General or Override layers of your preset by clicking on the pen icon and unlinking it from the parent template. Using the Tera programming language, remove or add functions and free text in any templates. Click on the eye icon for any field to view a hard-coded example.

Field Description Example
Title Appears in the notification title {{alertDef.priority}} - {{alertDef.name}}
Description Appears in the notification description
Footer Appears at the bottom of the notification

Raw presets

For maximum control over your message template, users may opt to build their message schema in JSON payload by clicking on the Raw tab. Once created, this configuration is sent as is to a connector.

Paste the fields of your choice for the message configuration into a clean JSON file. Slack users may add fields by copying them from Slack’s Block Kit or your Slack app notification template and pasting them into JSON.

Triggered & resolved presets

Each preset has a message configuration version for triggered notifications and resolved notifications. While the structure for each is identical, the templates change slightly. Move between tabs to review these two versions and customize as necessary.

Preset setup

To get started, navigate to Data Flow > Notification Center. Select a connector type as the basis for your notification.

  1. Navigate to the Presets tab.

  2. Click + Create new preset.

  3. Select the system preset on which to base your custom preset.

You will be presented with a predefined general configuration for the connector type. You may choose to keep it as is or modify any of the fields or templates to customize the message configuration to your needs.

Note

When modifying for Slack, you may choose to work on a structured or raw preset.

  1. Define triggered and resolved message configuration versions in a specific subtype, if relevant.

  2. When complete, click Test [optional] and then Done. If you click Test, a notification with hard-coded example values will be sent to the selected channel. The preset will appear in the Presets tab.

Managing existing presets

Manage your presets by navigating to Data Flow > Notification Center > Connector type > Preset tab.

The Presets tab consolidates all of your existing preset, including a description and preset type.

Take any of the following actions:

  • View a preset by clicking on the eye icon.
  • You may modify the existing preset by clicking on the pen icon.
  • Delete a preset by clicking on the garbage icon.
  • You may choose to select any of your presets as the default preset. This will auto-populate the relevant fields when you configure notifications for the connector as part of your alert definition setup.