Alerts
Alerts are a special type of event and they use the event publish and subscribe mechanism. Use alerts allow to define rules for firing events. Like with 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. When new data for a property arrives, alert rules are evaluated. If an alert rule applies, an alert is created. A data packet is sent to the subscribers.
Alerts are written to the alert history file that you can view 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 that generates an alert when the value is greater than 50, and a value = 51, an alert is generated and an alert event fires. If another value comes in at 53 before the original alert is acknowledged, another event is not fired because the current state is still greater than 50.
Alert types are specific to the data type of the property. The following base types can be used for alerts:
Boolean
Datetime
Infotable
Integer
Location
Number
String
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 (for example, through email or text message).
For information about AlertFunctions, see Resources.
Monitoring Alerts
The Alert History and Alert Summary streams provide the 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 it is manually removed.
Alert Summary compiles data from the last reset of the server to the current state. On the Alert Summary page, you can view, acknowledge, and sort (by acknowledged or unacknowledged) alerts.
1. From the ThingWorx header, choose Monitoring > Alert History.
All alerts are listed here.
2. Click the Alert Summary tab.
3. Click the unacknowledged tab to view alerts that have not been acknowledged.
4. Choose to acknowledge an alert on a property or on the source. Type a message in the corresponding field.
5. Click Acknowledge.
Acknowledging Alerts
An acknowledgement (ack) is an indication that someone has seen the alert and is dealing with it (for example, a technician is responding to low helium in an MRI machine). You can view acknowledgements from Monitoring > Alert History. The 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.
* 
If you acknowledge an alert and then save, the alert will be re-triggered. This is because the property is in the alert condition. If you don't want to re-trigger the alert, it should not be in alert conditions or it shouldn't be acknowledged.
Overriding Alerts
You can override the threshold values on a Thing’s alert at run time so that the alert is specific to current operating conditions, which can override properties in an existing Thing.
Was this helpful?