Alerts Use-Case: Structured Output Type
This tutorial describes how to set up presets for Notification Center using Alerts as the entity type.
Preset setup
Step 1: Getting started
Navigate to Data Flow > Notification Center > Presets. Select the destination type as the basis for your notification.
Click + New alert preset.
The schema presented in the preset is determined by destination type, entity type, and output type. In the example below, the user chooses the System preset for Alert notifications sent to Slack. The ouput type is basic, consisting of Title, Description, and Footer.
Step 2: Configure the General preset layer
You’ll be presented with the General configuration layers for the selected destination type. You may choose to keep as-is or customize any fields to fit your needs. Add or remove functions and insert free text in any templates as desired.
Step 3: Configure the Override preset layer
Configure the preset layer by first selecting an option from the left-hand panel. Click + Add override template to select the desired subtype.
As with the General layer, you can then either keep the default configuration or customize it to suit your needs.
In the example below, the user configures the Override layer for the following alert source subtype: Metrics Threshold Alert / Status: Triggered.
Note
When a template is customized in either the General or Override layers of a Custom preset, it becomes independent of the System preset.
Here are the implications for the use-case above:
- Title has been customized. Future system updates to this field will not be inherited.
- Description has been customized. Future system updates to this field will not be inherited.
- Footer continues to inherit from the System preset. If Coralogix updates the Footer template in the system preset, the change will automatically apply to this Custom preset.
For details on customizing your schema and examples, see Dynamic Templating.
Step 4: Define Triggered and Resolved configurations
For Alerts, define message configuration versions for Triggered and Resolved notifications in the specific entity subtype. While both structures are similar, the templates differ slightly. Navigate between the Triggered and Resolved tabs to view and modify the respective configurations as necessary. Keep in mind that any customizations made to one version do not automatically carry over to the other version.
Step 5: Validate and save the preset
Once you're done, you may select a connector and click Send test notification (optional). This sends a notification with hard-coded example values to the selected channel. Once saved, the new preset will then appear in the Presets tab.
Final notification output
When an Alert is triggered, the final notification is sent based on the preset configuration, with more specific, Custom configurations taking precedence over more general, System configurations.
Here is an example of a notification resulting from a preset for the Slack destination type: