Within Event descriptive properties, it is possible to use placeholders to enrich the text with context specific information (e.g. thing.name).
Event properties supporting placeholders are:
Title
Description
Notification message subject
Notification message body
Placeholders are automatically kept updated until the event is active. Once the event is cleared and saved into the historical events, placeholders are frozen.
Use the following syntax to include placeholders within a text:
The ${thing.name} is in an anomalous state.
The temperature is greater than ${metrics.Temperature.value} ${metrics.Temperature.unit}
The following list, reports the placeholders that can be used within event properties.
PLACEHOLDER | DESCRIPTION | SAMPLE VALUE |
metrics.<METRIC_NAME>.value | The value of the <METRIC_NAME> metric | 101, true, 12.77, LOW_WATER |
metrics.<METRIC_NAME>.unit | The measuring unit of the <METRIC_NAME> metric | Kg, m |
metrics.<METRIC_NAME>.valueLabel | The label associated to the value in case of dictionary and thresholds. | HIGH |
metrics.<METRIC_NAME>.valueSeverity | The label associated to the value in case of dictionary and thresholds. | CRITICAL |
thing.id | The thing identifier | abcde12345 |
thing.name | The thing name | Printer-floor1 |
thing.serialNumber | The thing serial number | XY000001 |
thing.serviceLevel | The Service Level name associated with the Thing | GOLD |
thing.properties.<name> | The thing property named <name> | |
thingDefinition.id | The thing definition identifier | abcde12345 |
thingDefinition.name | The thing definition model name | Mod123 |
thingDefinition.properties.<name> | The thing property named <name> | |
partner.name | The partner name | Boiler Service s.r.l. |
partner.code | The partner identification code | PN3D4574 |
partner.properties.<name> | The partner property named <name> | |
postComputationResults.<FIELD_NAME>.<OUTPUT_NAME> | The Post Computation result property of a work session. | |
customer.name | The customer name | |
customer.country | The customer country | |
customer.properties.<name> | The customer property named <name> | |
location.name | The location name | |
location.country | The location country | |
location.properties.<name> | The location property named <name> | |
event.title | The alert title | |
event.description | The alert description | |
event.durationFormatted | The alert duration | 22h 3m |
event.activatedTime | The alert activated timestamp in milliseconds | 1615311801 |
event.clearedTime | The alert cleared timestamp in milliseconds | 1615311801 |
alert.severity | The alert severity | CRITICAL |
alert.category | The alert category | ANOMALY |
Partner-based placeholders will be replaced with the first partner associated with the Thing where the alert has occurred on.
Formatting date/times
By default, date/time properties and active/clearing timestamps are replaced with the time value in milliseconds, but it is possible to use the following placeholder suffixes to format date/time in a friendly way:
toUTCFormat
Formats the date/time using the UTC timezone.
alert.activatedTime.toUTCFormat → 2018-03-25 10:34:22 UTC
toLocaleFormat
Formats the date/time using the user preferred timezone.
alert.activatedTime.toLocaleFormat → 2018-03-25 11:34:22