Aggregation Rules
An aggregation rule differs from a declarative rule in how the threshold is evaluated. A declarative rule compares the threshold with the number of events that matched the condition. An aggregation rule compares it with an aggregate value calculated from the events in the window, such as a sum, average, or distinct count.
Correlation
On the Correlation tab, define the window in which SMRTC collects data for aggregation:
- In
Pre-filter, enter an expression in the SML (RTC) dialect. An event must match this expression to be included in the aggregation window - Select
Grouping Fields, which are field chips used to maintain a separate aggregate. A separate set of metrics is calculated and a separate firing is generated for each combination of these field values - Set the
Time Windowusing theDurationandUnitfields. This is the interval during which SMRTC accumulates events for metric calculation - If necessary, enable
Suppression Settings, and complete theDurationandUnitfields in theSuppressionsection that appears, as for a declarative rule. See Declarative Rules. After a firing, subsequent firings for the same group are suppressed for the specified period
Metrics
In Metrics, configure one or more aggregates whose values determine whether the rule fires:
-
Click
Metricto add a metric section -
Enter a
Name. The metric value is available under this name inFiring Conditionand in the firing document -
Select a
Function. The field offers functions in the following order:count,sum,min,max,avg,dc,values,median,p95,p99,variance,stddev,first,last,earliest,latest,rate -
Specify a
Field, which is the event field used by the function.Fieldis optional only forcountandrate. If it is specified for these functions, only events containing that field are included in the calculation -
If necessary, enter a
Filter, which is a metric-specific event selection condition in the SML (RTC) dialect. If no filter is specified, the metric is calculated from all events that passedPre-filter
Firing Condition
In Firing Condition, enter an expression that uses metric names, for example, total >= 1000000000. It is evaluated after the window metrics have been calculated and determines whether a firing is generated.
Firing Condition is evaluated against the names specified in the Name field of each metric, not against event fields. The field mapping described in Rules does not apply to this condition.