The <computedThreshold> element is valid only for the threshold rule. It contains an expression that is called as each event is received and that computes the threshold value based on the current event and on any other events that have matched the event selection criteria for the rule. The expression returns the computed threshold value to be stored in a variable that is defined for the rule. The rule then uses the computed threshold value to compare against the defined threshold value.
Refer to Variables for information about the variables that can be used in expressions. The use of certain variables is dependent on the context of the expression.
<computedThreshold> has the following attributes:
Name | Description | Data type | Required? |
---|---|---|---|
expressionLanguage | Identifies the programming language in which the expression is written. Because the Java™ programming language is the only supported expression language, the only valid value for this attribute is java. | xsd:NMTOKEN | Yes |
threshold | Defines the threshold value that is to be met. This defined threshold value must be a string representation of a numeric value that can be converted to a data type that is valid for the rule variable. | xsd:string | Yes |
assignTo | Identifies the name of the variable that holds the computed
threshold value that is returned from this expression. This variable must
already be defined for the rule (at the rule set, rule block, or rule level)
using the <variable> element. It must be defined as one of the following
numeric data types:
|
xsd:NMTOKEN | Yes |
thresholdComparison | Defines the operator for comparing the computed threshold
value to the defined threshold value. The valid values for this operator are:
|
xsd:string | Yes |
<computedThreshold> contains no elements.