Choose a detection rule type
Lakewatch is in Beta. Workspace admins can control access to this feature from the Previews page. See Manage workspace-level previews.
Choose a rule type based on the data your detection needs and when it must evaluate new events. Both types use SQL logic and create signals for matches. You can't change a rule's type after you start authoring it.
Compare rule types
Rule type | How it runs | Detection logic | Compute |
|---|---|---|---|
Scheduled | Runs over a time window on a schedule. | A full SQL query that can join tables, aggregate events, or compare historical data. | A SQL warehouse that you provide. |
Streaming | Evaluates new rows of one source table continuously. | A supported SQL predicate that evaluates each row independently. | Managed by Lakewatch. |
Streaming detection rules are an experimental feature. See Streaming detection rules for supported predicates and source requirements.
Match a detection pattern to a rule type
The following table explains which rule types fit common detection patterns and why:
Detection pattern | Example | Rule type | Why this rule type fits |
|---|---|---|---|
Signature or indicator of compromise (IOC) match | A process hash in a known-bad list, or a connection to a flagged IP address. | Streaming or scheduled | Streaming can match each arriving row against literal values. Use a scheduled rule when the match requires a lookup table or join. |
Atomic signal | A new administrator account, a cleared audit log, or a new mailbox forwarding rule. | Streaming or scheduled | One event contains the evidence needed to match. Streaming evaluates the event as it arrives. Scheduled rules evaluate it during a scheduled run. |
Short-window threshold | More than 5 failed sign-ins for one user in 1 minute. | Scheduled | Requires counting or aggregating multiple events within a time window. |
Behavioral baseline or anomaly | A user accessing more servers than their 30-day norm. | Scheduled | Requires comparing activity with historical data or a baseline. |
Rare or first-seen activity | A process hash that hasn't appeared before. | Scheduled | Requires checking whether an event or value appears in historical data. |
Cross-source correlation | A sign-in followed by file-share access and data exfiltration, joined across sources. | Scheduled | Requires combining events from multiple tables. |
Scheduled rules can also express the single-event matches that streaming rules support. Choose streaming when you need continuous evaluation and can express the detection as a supported single-row predicate.
A streaming rule can evaluate rows that contain data correlated or enriched upstream. In that case, the upstream processing performs the correlation. The detection rule evaluates only the resulting row.
Create the rule
Follow the creation steps for the type you select:
You can also import prebuilt scheduled rules from the Content library.