Skip to main content
Version: Unreleased

Advanced Alerts: Concepts & Visual Guide

info

This page introduces advanced alerting features, including event transformation, alert configuration, and bookmarking. Use the tabs and visual examples to master powerful monitoring and automation.


Quick Start

  1. Review the event transformation and alert config sections below.
  2. Use the code and screenshots in each tab as a reference for your setup.
  3. Explore advanced options for custom logic, global variables, and bookmarking.

Bookmark Settings & TimeSeries

Event Transformation Function

info

The event transformation function is a JavaScript function executed for each event before it is processed by the alert system. Use this function to:

tip

This enables flexible, real-time enrichment of your event data.

Global Variables

event transformation function

Example transformation function

function addDuration(event) {
const etype = event?.attrs?.type;
if (etype === undefined) return;
if (etype === "reg-new" || etype === "reg-del" || etype === "reg-expired") {
event.attrs.fnc = event.attrs.from + "#" + event.attrs.contact;
}
if (etype === "call-attempt") {
// Example: set duration to 0 for call attempts
event.attrs.duration = 0;
} else if (etype === "reg-new") {
event.attrs.regdiff = 1;
event.attrs.regid = event.attrs.from + event.attrs["call-id"];
}
if (etype === "reg-del" || etype === "reg-expired") {
event.attrs.regdiff = -1;
event.attrs.regid = event.attrs.from + event.attrs["call-id"];
}
// Normalize index name by removing date
if (event?.metadataAA) {
event.metadataAA.fullIndex = event?.metadataAA?.index?.split("-")?.[0];
}
}
warning

Be careful when modifying event attributes, as incorrect logic can lead to missed or false alerts.

💡 Tip: Use transformation functions to pre-process events for more effective alerting and analytics.


🌐 Global Variables

info

Global variables provide shared context and configuration for your alerting logic. These can be used to store reusable values, thresholds, or state across multiple alerts.

global variables


Alert Config

info

The alert configuration allows you to define how alerts are processed, including:

  • The conditions that trigger an alert
  • The actions to take when an alert is triggered
  • Notification and escalation settings
tip

Start with the overview below, then explore each configuration page in the tabs.

alert configuration

info

Preview how a test event is processed and triggers alerts. Useful for debugging and validation.

test Event


Adding a New Alert

info

Adding a new alert is simple and intuitive. Use the interface below to define your alert criteria, actions, and notification preferences. The screenshots in the tabs illustrate different alert types and advanced options.

add new alert

core Alert

info
Core Alert Form Fields Explained:
  • Alert Type: Select from string match, custom-key match, custom key memory, silent tenant, custom-key high rate, or custom-key ratio. See Events Reference for event types.
  • Description: A human-readable explanation of what this alert does.
  • Alert Status: Toggle to enable or disable the alert itself.
  • IP BlackList: Toggle to enable or disable blacklisting of the source IP address when the alert triggers.
  • Filter: Free-form text for a filtering expression to select relevant events.
  • Restful Channel: Choose from a predefined list of RESTful notification channels.
  • Restful FMT: Formatting string for RESTful notifications (e.g., alert for attrs.type).
  • Severity: Select the severity level: high, medium, low, or info.
  • Throttle Period: Throttle period in seconds to limit alert frequency.
tip

Adjust these fields to match your monitoring needs. For more on event attributes, see the Events Reference.


🔖 Bookmark Settings & TimeSeries

info

Bookmark settings allow you to save, organize, and quickly access important events or alert configurations. Use bookmarks to streamline your workflow and revisit key data points.

bookmark settings

info

the TimeSeries section visualizes the data and events that you have bookmarked. You can access this visualization by clicking the magnifying glass icon next to a bookmark, providing a clear and interactive way to analyze trends, patterns, and anomalies over time. Use this visualization to gain deeper insights into your alert history and system behavior.


How It Works

  1. Ingestion: The system ingests incoming JSON events from various data sources (e.g., network equipment, SBCs).
  2. Stream Mapping: Events are mapped into streams using selected keys (such as user, trunk, or IP).
  3. Alert Evaluation: Each stream is checked against alerting criteria. If a threshold is exceeded, an alert is triggered.
  4. Notification/Automation: Alerts are pushed via RESTful plugins or other integrations.
tip

For a detailed explanation of event types and their structure, see the Events Reference.


Footnotes

[1] Z-score is a statistical measure that describes how many standard deviations a data point is from the mean. In alerting, it is used to detect anomalies by identifying values that are unusually high or low compared to historical data. For example, a high z-score may indicate a sudden spike in call attempts or errors, triggering an alert for abnormal behavior.