Skip to main content

6.1 Event Templates

An event template defines the schema and behavior of events. Every event generated by an analysis must be based on an event template. Templates are managed centrally in Libraries → Event Template, making them reusable across any analysis in the system.

6.1.1 Creating an Event Template

Event templates are managed centrally in Libraries and can be referenced by any analysis in the system. To create a new event template:

  1. Navigate to Libraries → Event Template in the left navigation.
  2. Click the + (New Event Template) button.
  3. Configure the template fields (see below).
  4. Click Save.

6.1.2 Template Configuration

Event template configuration consists of three parts — general settings, event naming pattern, and template inheritance — which together define the event's identification, naming convention, and hierarchical relationships between templates.

6.1.2.1 General Settings

The following fields define the basic properties and behavioral rules of the event template.

FieldDescription
NameUnique identifier for the template
CategoryTag for organizing templates (e.g., "Base Template" or a custom category)
Base Template OnlyIf enabled, this template cannot be directly used to create events — it can only serve as a parent for other templates
Severity LevelDefault severity for events created from this template: Critical, Major, Minor, Warning, or Normal
Allow ExtensionIf enabled, other templates can inherit from this template
Allow AcknowledgmentIf enabled, events created from this template require human acknowledgment. Unacknowledged active events will continue to trigger re-notifications according to the element's notification rule
Reason CodeAn optional enumeration set that classifies the cause of the event. Must be defined in advance under Libraries → Enumerations
Reason Code ValueA specific value within the reason code enumeration, providing a more detailed cause description
Minimum Notification IntervalThe minimum time between consecutive notifications for events from the same analysis. Prevents notification overload when an analysis fires events frequently — for example, if set to 20 minutes, only one notification is sent per 20-minute window regardless of how many events trigger
DescriptionFree-text description of the template's purpose

6.1.2.2 Event Naming Pattern

Every event generated from a template receives a name constructed from the Event Naming Pattern. Enter static text and insert placeholder variables by clicking the + icon on the right side of the field. Available variables include:

VariableDescription
${Element#name}Name of the element that triggered the event
${Analysis#name}Name of the analysis that triggered the event
${EventTemplate#name}Event template name
${startTime}Event start time
${endTime}Event end time
${createTime}Event creation time
${attributes["AttrName"]#value}The current value of an element attribute. AttrName is a placeholder that you must manually replace with an actual attribute name that exists on the element. For example, if the element has an attribute named location, write ${attributes["location"]#value} — the system resolves it to the attribute's actual value when generating the event.

For best results, include the element name, analysis name, and start time in the pattern — this makes every event name self-descriptive: ${Element#name} - ${Analysis#name} - ${startTime}.

6.1.2.3 Template Inheritance

Event templates support a hierarchical inheritance mechanism, allowing sub-templates to extend and customize the configuration of a parent template. When creating a template, you can select a Base Template from which the new template inherits configuration. Sub-templates can extend the base template's attribute schema and override individual settings.

If a template is marked Base Template Only, it cannot be referenced directly when configuring an analysis — it can only be used as a parent.

6.1.3 Event Attribute Templates

Event attribute templates define the custom attributes that events can carry, recording key data at the time of occurrence — for example, the peak temperature during an exceedance, or the batch ID at the time of a fault. These attributes are defined in the Event Attribute Template section of the event template editor.

For each attribute, configure:

FieldDescription
NameAttribute name
CategoryOptional tag
Data TypeThe value type (numeric, string, etc.)
Default ValueValue used if the analysis does not write to this attribute
ConstantIf enabled, the value cannot be changed after creation
HiddenIf enabled, the attribute is not shown in normal event views

When configuring an analysis, the output of a calculation can be written to any attribute defined in the event template. This supports capturing computed values — like the average value during a window, or the maximum exceedance — directly in the event record.

tip

Event attribute data is stored in TDengine IDMP's built-in relational database, not in the time-series store. Event attributes do not support data reference configuration.

6.1.4 Managing Event Templates

The Libraries → Event Template list provides a centralized view of all templates with their name, category, severity, and description, supporting edit and delete operations. Use the action icons on each row to:

  • Edit — Modify the template configuration
  • Delete — Remove the template (only possible if no analyses reference it)