Alarms Count
Use this node to count alarms matching configured criteria and write the count as telemetry — for example, maintaining a real-time activeAlarmCount metric on a device asset that increments when new alarms are created and decrements when they are cleared, or tracking how many critical alarms occurred in the last 24 hours.
Configuration
Section titled “Configuration”- Count alarms for propagation entities — when enabled, counts alarms not only for the message originator but also for all entities to which those alarms are propagated.
Alarms count mappings
Section titled “Alarms count mappings”A table where each row defines one alarm count metric:
| Field | Description |
|---|---|
| Target telemetry | Key name on the entity where the alarm count is stored |
| Status filter | Restrict to alarms with specific statuses (e.g., ACTIVE_UNACK). Leave empty to include all statuses. |
| Severity filter | Restrict to alarms with specific severities (e.g., CRITICAL, MAJOR). Leave empty for all severities. |
| Type filter | Restrict to alarms of specific types. Leave empty for all types. |
| Specify interval | When enabled, only count alarms created within a configured time interval. |
Message processing algorithm
Section titled “Message processing algorithm”- Receive an alarm-related message:
ALARM,ALARM_ACK,ALARM_CLEAR, orENTITY_CREATED/ENTITY_UPDATEDabout an alarm. - For each mapping row, execute an alarm count query against the originator entity (and propagated entities if configured), applying the status, severity, type, and time interval filters.
- Write each count result as a
POST_TELEMETRY_REQUESTmessage with the originator as the entity. - Route generated messages via
Success. If the count query fails for an entity, route a failure message viaFailure.
Output connections
Section titled “Output connections”| Connection | Condition |
|---|---|
Success | Generated POST_TELEMETRY_REQUEST for the entity with the alarm count. |
Failure | Alarm count query failed; failure message contains the reason. |
JSON schema
Section titled “JSON schema”{ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "TbAlarmsCountNodeConfiguration", "type": "object", "additionalProperties": true, "properties": { "countAlarmsForPropagationEntities": { "type": "boolean" }, "alarmCountMappings": { "type": "array", "items": { "type": "object", "properties": { "targetKey": { "type": "string" }, "statusList": { "type": "array", "items": { "type": "string" } }, "severityList": { "type": "array", "items": { "type": "string" } }, "typeList": { "type": "array", "items": { "type": "string" } }, "specifyInterval": { "type": "boolean" } } } } }}