This component allows generating unique alarms. You are able to specify alarm ID and alarm body templates. Template evaluation is based on velocity engine. When component process incoming device messages it substitutes message values and device attributes into template. Alarm uniqueness is controlled by result value of alarm ID. If processor detects unique alarm, it will add following metadata:
Template evaluation is done using certain context. This context is populated with values based on device message and attributes. Attribute values are available using maps with following names:
Telemetry values are pushed directly to the context using their keys. Context is also populated with reserved date object. For example, following template:
[$date.get('yyyy-MM-dd HH:mm:ss')] Device $cs.get('serialNumber')($cs.get('model')) temperature is $temperature.valueAsString!
Will be evaluated into
[2016-01-02 03:04:05] Device SN-001(A) temperature is 100!
for Device with
and telemetry message
We recommend to include the truncated date and some unique device attribute into alarm id template. This will ensure that you will not generate alarms for the same device problem too often.
As a tenant administrator, you are able to review processor example inside Rules->Demo Alarm Rule->Processors->Alarm Deduplication Processor.