Detections
A detection is what an Analytic Rule produces. One is raised for each row the rule’s query returns, and it is the detection, rather than the row, that is delivered to the rule’s notifications.
Detections written to a
Feed
Feed
detection:1 namespace, so they can be indexed and searched like any other data in Stroom.
Detections sent by email are rendered through a template that has access to the same fields.
Warning
detection:1
XML Schema
XML Schema
detectorUuid, executionSchedule, executionTime, effectiveExecutionTime, level, status and feedName, none of which that schema declares, and the schema requires a headline element that a rule does not produce.
This affects validation only, for example an XML Schema filter in a pipeline.
Indexing, searching and delivery are unaffected.
How a Detection is Built
Most of a detection is filled in for you from the rule and from the run that raised it.
| Field | Where it comes from |
|---|---|
detectTime |
When the detection was raised. |
detectorName |
The name of the Analytic Rule . |
detectorUuid |
The
UUID
UUID
A Universally Unique Identifier for uniquely identifying something. UUIDs are used as the identifier in Doc Refs. An example of a UUID is Click to see more details... of the rule document.4ffeb895-53c9-40d6-bf33-3ef025401ad3. |
detectorVersion |
The version of the rule document at the time it ran. |
detailedDescription |
The content of the rule’s Documentation tab, see below. |
detectionUniqueId |
A generated
UUID
UUID
A Universally Unique Identifier for uniquely identifying something. UUIDs are used as the identifier in Doc Refs. An example of a UUID is Click to see more details..., different for every detection.4ffeb895-53c9-40d6-bf33-3ef025401ad3. |
detectionRevision |
Always 0 for detections raised by a rule. |
executionSchedule |
The name of the execution schedule that fired, for a scheduled rule. |
executionTime |
The wall clock time at which the rule ran. |
effectiveExecutionTime |
The point in time the run represented. |
values |
One entry per column in the query, see below. |
linkedEvents |
Built from the StreamId and EventId columns, see below. |
level |
The severity declared by the rule, where it declares one, see Settings. |
status |
How reliable the rule declares itself to be, where it declares it, see Settings. |
Because detailedDescription comes from the rule’s documentation, what you write there is delivered with the detections the rule raises.
It is worth writing it for whoever receives the detection rather than for whoever maintains the rule.
Whether it is included is controlled by Include Rule Documentation on the Settings tab, which applies to every processing type.
Where it is unticked, detailedDescription is left empty.
Note
detectorVersion is the version of the rule document, which changes every time the rule is saved.
It is not a version you set yourself.
Values
Every column the query selects becomes an entry in values, keyed by the column name.
In a feed these appear as <value name="..."> elements, and in an email template they are reachable through the values dictionary.
The two exceptions are StreamId and EventId.
Rather than appearing in values, they are used to build a linked event, which records the
Stream
Stream
See Also
Fields a Rule Does Not Set
The detection:1 schema has several fields that an Analytic Rule never populates, because they only make sense for a detector that revises its own findings over time.
| Field | Purpose |
|---|---|
headline |
A short description of what was detected. |
fullDescription |
A complete description of what was detected. |
detectorEnvironment |
Where the detector was deployed. |
defunct |
Marks earlier revisions of a detection as invalid. |
These exist because the same schema is used by detections produced outside Stroom, for example by an XSLT in a translation pipeline or by an external processing framework, which can set them.
See Also
Detections as a Data Source
Writing detections to a feed means they can be treated as data in their own right. Once indexed they can be searched from a Dashboard or Query, reported on, and used as the input to further rules.
A rule whose query runs over a feed of detections is a common way of spotting a pattern across detections that no single detection shows on its own.