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:
- Navigate to Libraries → Event Template in the left navigation.
- Click the + (New Event Template) button.
- Configure the template fields (see below).
- 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.
| Field | Description |
|---|---|
| Name | Unique identifier for the template |
| Category | Tag for organizing templates (e.g., "Base Template" or a custom category) |
| Base Template Only | If enabled, this template cannot be directly used to create events — it can only serve as a parent for other templates |
| Severity Level | Default severity for events created from this template: Critical, Major, Minor, Warning, or Normal |
| Allow Extension | If enabled, other templates can inherit from this template |
| Allow Acknowledgment | If 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 Code | An optional enumeration set that classifies the cause of the event. Must be defined in advance under Libraries → Enumerations |
| Reason Code Value | A specific value within the reason code enumeration, providing a more detailed cause description |
| Minimum Notification Interval | The 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 |
| Description | Free-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:
| Variable | Description |
|---|---|
${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:
| Field | Description |
|---|---|
| Name | Attribute name |
| Category | Optional tag |
| Data Type | The value type (numeric, string, etc.) |
| Default Value | Value used if the analysis does not write to this attribute |
| Constant | If enabled, the value cannot be changed after creation |
| Hidden | If 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.
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)
