Alerts are a special type of event. Alerts allow you to define rules for firing events. Like events, you must define a subscription to handle a change in state. All properties in a Thing Shape, Thing Template, or Thing can have one or more alert conditions defined.
Alerts have conditions which describe when the alert is triggered. The types of conditions available depend upon the property type. For example, string alerts may be triggered when the string matches pre-set text. A number alert may be set to trigger when the value of the number is within a range.
Alert types are specific to the data type of the property. Properties configured as the following base types can be used for alerts:
Creating an Alert
When creating an alert:
Steps to create or modify an Alert:
Once Alerts are defined, they appear on the Properties page (while in Edit mode).
After an Alert is defined, a Subscription to that Alert can be configured to launch the appropriate business logic, such as notifying a user of an Event through email or text message.
When an Alert condition is met, ThingWorx fires off an Alert. You can create a Subscription to the Alert so that you are automatically notified when an Alert is triggered. Alerts are written to the alert history file and can be viewed through the Alert Summary and Alert History Mashups. The system tracks acknowledged and unacknowledged alerts. Alerts do not fire redundant events. For example, if a numeric property has a rule defined that generates an alert when the value is greater than 50, and a value = 51, an alert is generated and an alert event will fire. If another value comes in at 53 before the original alert is acknowledged, another event will not be fired because the current state is still greater than 50.
The Alert History and Alert Summary streams provide functionality to monitor alerts in the system. Alert History is a comprehensive log that records all information recorded into the alert stream, where the data is stored until manually removed.
The Alert Summary provides the ability to filter by all alerts, unacknowledged alerts, or acknowledged alerts. You can also acknowledge alerts on a selected property or all alerts from a particular source (thing).
This information can be retrieved using Scripts as well, so you can create your own Alert Summary and History mashups.
For each alert, the following displays:
The Alert History screen displays all Alerts that were once in an alert condition, but have moved out of that alert condition. A Data Filter is provided at the top of the mashup to more easily find a particular Source, Property, or Alert.
The Alert History report is a Thingworx Mashup created using standard Thingworx functionality. This means that any developer has the ability to re-create this report or a modification of this report.
An acknowledgement (ack) is an indication that someone has seen the alert and is dealing with it (for example, low helium in an MRI machine and someone is filling it). Alert History shows when alerts were acknowledged and any comments.
You can acknowledge an alert on a property or on the source. A source acknowledgment acknowledges all alerts on the source Thing for the selected alert in Monitoring > Alert Summary. A property acknowledgment (ack) only acknowledges the alerts on the property for the selected alert in Alert Summary.
For example, you create a Thing with two properties that have alerts set up. You put both properties in their alert states. View Alert Summary and select the Unacknowledged tab. You should see two alerts. Select one, and do a property acknowledgement. The alert you selected moves to the Acknowledged tab and is removed from the Unacknowledged tab. Put both properties in their alert states again, select one of the alerts on the Unacknowledged tab, and this time do a source acknowledgement. In this case, both alerts move to the Acknowledged tab, even though you only selected one of them.
For more information about Alerts, click here.
To view a tutorial video on alerts, click here.
Refer to this article for best practices affecting alerts.