...
- If no
copy_first
,copy_last
,copy_highest
orcopy_groupby
directives are present, then a backwards-compatible directive 'copy_last => [ qr// ]'
is added. copy_first
is evaluated first, and specifies which event properties should be copied over from the earliest trigger event.
Each listed property is copied over; if the directive contains a regular expression (e.g.qr/cust.*/
, then all properties with names matching the regular expression are copied.copy_last
is checked next, and properties listed here are copied over from the most recent trigger event.
The property copying does overwrite all properties that were set earlier (bycopy_first
).copy_highest
is checked next, and its properties are sourced from the trigger event with the highest priority.
Again overwriting of properties may happen.copy_groupby
controls whether any of the grouping property values should be saved in the new event.
The format is different for this directive: It must be a list of property target names (or the word 'undef'), in the same order as thegroupby
directive.
For each element in thegroupby
list, the value of the grouping property is saved as the target name in the new event, if a target name is available in thecopy_groupby
list.
If nogroupby
is given for this rule, then acopy_groupby
directive has no effect.- Now the
enrich
clause is checked, and each of its property name - value pairs indicates which properties should be set to (or overwritten with) a particular static value. - Now the
node
,stateful
andelement
properties are automatically adjusted if required (see below for details). - Finally, the event name is set to the rule name, certain undesirable properties are removed, an audit trail of triggering events is added (by adding the properties
nodes
andeventids
), the event is marked assynthetic
and is inserted into the database.
Please note that "earliest event" in step 1 refers to the event with the earliest event timestamp, which does not necessarily reflect its processing order. opEvents processes inputs mostly - but not always - in chronological order. If you have multiple 'earliest' events (all with the same timestamp) then their order is undefined and copy_first
will pick a random event.
The same caveat applies in step 2 for the "most recent event".
Automatic Event Node for Synthetic Events
...