AlertRule

LiveView. AlertRule

new AlertRule(settingsopt)

Object that represents an alert rule.
Parameters:
Name Type Attributes Description
settings Object <optional>
Object containing initialization values for the new AlertRule
Properties
Name Type Attributes Description
guid String <optional>
The unique identifier for this AlertRule. Note: The guid behaves exactly like id but is only available in 10.4.0 onwards.
name String <optional>
The name of the AlertRule. This can contain spaces and other symbols.
enabled boolean <optional>
A flag indicating whether or not the AlertRule is currently enabled (i.e. is it currently being considered when determining whether to fire an alert).
description String <optional>
A description of the rule.
severity Number <optional>
A number indicating the severity of alerts created by this rule. Higher numbers correspond to a higher degree of severity. By default, the system uses values 1, 3, and 5 to indicate low, medium, and high degrees of severity.
messageTemplate String <optional>
A message template that will be filled in with the specified field values of the tuple that caused the alert. Indicate tuple fields in the template by using the $ symbol. For example "Store $storeNumber is running low on $itemName". When the AlertRule is triggered, the field values of the tuple that caused the alert will be substituted in to the corresponding template locations. Field values for this AlertRule may also be referenced in the message template. Fields: Name, Severity, Created, Owner, and ID may all be referenced by using ${AlertRule.fieldName} in the template string (e.g. "Rule ${AlertRule.Name} just fired!").
quiescence Number <optional>
If this AlertRule is triggered, quiescence is the number of milliseconds to delay subsequent triggering. This can be useful if this AlertRule triggers frequently once its condition is met and multiple, repeated alerts are undesired. The delay time starts once the actions for the initial trigger have completed.
actions Array <optional>
An array of objects that will be parsed into an array of Action objects.
alertQueryConfig Object <optional>
An object that will be parsed into into a QueryConfig. The object should contain fields: predicate, table, predicateDelayInMillis, and queryType.
status String <optional>
Indicates whether this AlertRule is in a "valid" or "invalid" state.
statusMessage String <optional>
Provides additional details about the current status. If the status is "valid" then statusMessage will just be "OK". If the status is "invalid", the statusMessage will contain more details about why the AlertRule is currently invalid.
version Object <optional>
An object that will be parsed into a Version. The object should contain fields: number and string.
owner String <optional>
The username of the owner of this AlertRule.
lastUpdated String <optional>
A date/time string of the last time this AlertRule was updated.
type String <optional>
A string to specify the type of alert (time based or query based).
cronString String <optional>
A cron string that defines the behavior of a time based alert.
alertGroup String <optional>
The alert group that this AlertRule belongs to.

Classes

Action
DeleteRowsAction
ExecJavaAction
ExecOsCommandAction
InvokeHTTPAction
LVPublishAction
LVPublishAction
PublishAlertAction
QueryConfig
SendEmailAction
SendTupleAction
Version

Members

actions :Array

The actions that will execute when this AlertRule is triggered.
Type:
  • Array

alertGroup :String

Since:
  • 10.5.0
The alertGroup that this alert rule belongs to.
Type:
  • String

alertQueryConfig :LiveView.AlertRule.QueryConfig

The query configuration defines the conditions under which this AlertRule will fire an alert.
Type:

created :String

A date/time string of when this AlertRule was created.
Type:
  • String

cronString :String

In the case of a time based alert, this string specifies the behavior of the time based alert. Please see Quartz Scheduler for documentation.
Type:
  • String

description :String

A description of the rule.
Type:
  • String

enabled :boolean

A flag indicating whether or not the AlertRule is currently enabled (i.e. is it currently being considered when determining whether to fire an alert).
Type:
  • boolean

guid :String

Since:
  • 10.4.0
The unique identifier for this AlertRule. Note: The guid behaves exactly like id but is only available in 10.4.0 onwards.
Type:
  • String

lastUpdated :String

A date/time string of the last time this AlertRule was updated.
Type:
  • String

messageTemplate :String

A message template that will be filled in with the specified field values of the tuple that caused the alert. Indicate tuple fields in the template by using the $ symbol. For example "Store $storeNumber is running low on $itemName". When the AlertRule is triggered, the field values of the tuple that caused the alert will be substituted in to the corresponding template locations. Field values for this AlertRule may also be referenced in the message template. Fields: Name, Severity, Created, Owner, and ID may all be referenced by using ${AlertRule.fieldName} in the template string (e.g. "Rule ${AlertRule.Name} just fired!").
Type:
  • String

name :String

The name of the AlertRule. This can contain spaces and other symbols.
Type:
  • String

owner :String

The username of the owner of this AlertRule.
Type:
  • String

quiescence :Number

If this AlertRule is triggered, quiescence is the number of milliseconds to delay subsequent triggering. This can be useful if this AlertRule triggers frequently once its condition is met and multiple, repeated alerts are undesired. The delay time starts once the actions for the initial trigger have completed.
Type:
  • Number

severity :Number

A number indicating the severity of alerts created by this rule. Higher numbers correspond to a higher degree of severity. By default, the system uses values 1, 3, and 5 to indicate low, medium, and high degrees of severity.
Type:
  • Number

status :String

Indicates whether this AlertRule is in a "valid" or "invalid" state.
Type:
  • String

statusMessage :String

Provides additional details about the current status. If the status is "valid" then statusMessage will just be "OK". If the status is "invalid", the statusMessage will contain more details about why the AlertRule is currently invalid.
Type:
  • String

type :String

A enumerated string that specifies whether an alert will be a query based alert or a time based alert. In the case of a query based alert, the string should be "query-alert". In the case of a time based alert, the string should be "cron-alert".
Type:
  • String

version :LiveView.AlertRule.Version

The version object that has details about the version of this AlertRule.
Type: