Detection Rule

A detection rule is a rule that applies a conditional expression to the logs and cloud configuration ingested into Datadog and generates one signal at the moment the condition is met. It works as a component shared across the security products, from Cloud SIEM to Workload Protection.

Overview

A detection rule is a conditional expression that spells out what Datadog's security products regard as a threat. It takes ingested logs, cloud configuration, activity on hosts, and the like as input, and each time the condition defined in the rule is met within a given time window, it generates one security signal. Because the out-of-the-box rules Datadog provides are imported automatically, you care about this term when you supplement situations specific to your company that slip through the ready-made net with custom rules, and when you adjust the conditions or severity of a rule that fires too often.

A rule that applies a condition to input and emits one signal when it is met

A detection rule is a conditional expression applied to the entirety of the logs and cloud configuration ingested into Datadog. When even one of the cases defined in the rule is met within a given time window, a security signal (a record of one detection) is generated. The target is all ingested logs. Cloud SIEM evaluates ingested logs, Cloud Security evaluates cloud configuration and IAM risks, and Workload Protection evaluates the system activity the Agent observes. When App and API Protection watches for threats to the application environment, it is the same "detection rule" component (as of September 2026; Source: Detection Rules). Once you have learned how to read a detection rule, the way of looking at it, "what input, under which condition, at which severity does it fire," carries over unchanged even when the product changes.

Out-of-the-box rules grow on their own; custom rules you cultivate yourself

There are two lineages of rules: out-of-the-box rules prepared by Datadog's security research team, and custom rules written by users. Out-of-the-box rules are built to target attacker techniques and candidate misconfigurations. Custom rules are needed when you add conditions specific to your own environment or business; the example the official documentation gives is a rule that catches sensitive operations from regions where you do not operate (as of September 2026; Source: Detection Rules). The automatic import of new rules and the two ways of creating one, cloning or starting from a blank slate, are left to the Cloud SIEM explainer. If you follow the procedure of editing a clone and disabling the original, you can always return to the original conditions.

Inside a single rule - the 3 layers of query / case / severity

Taking the Cloud SIEM rule creation screen as an example, a single rule is made of 3 layers. First is the query that narrows the input: you select the target with the same syntax as log search, and if you specify an entity such as user or IP address in group by, signals are separated per value. Next are the cases (conditions), where you use the labels attached to the queries to write count comparison expressions such as a > 3, and with multiple queries you can also compose sequence conditions like "A followed by B." Finally, you choose the severity per case from 5 levels: INFO / LOW / MEDIUM / HIGH / CRITICAL (as of September 2026; Source: Create a Custom Rule). Recipients are added under And notify.

  • Choose the type (real-time / scheduled / a Historical job that targets past logs).
  • Choose the detection method (7 options: Threshold / New value / Anomaly / Content anomaly / Impossible travel / Third party / Signal correlation).
  • Narrow the input with a query and decide the entity that separates signals with group by.
  • Write comparison expressions in the cases and attach a severity and recipients per case.
  • When met, one signal is generated per group by value.
Source: the descriptions in Custom Detection Rules and Create a Custom Rule, rearranged in the order of building a single rule (as of September 2026).

Mapping to MITRE ATT&CK tactics and techniques to see gaps in the net

Rules can be assigned MITRE ATT&CK tactics (what the attacker is after) and techniques (how they carry it out). Cloud SIEM / Workload Protection / App and API Protection rules are organized along this framework. Opening the MITRE ATT&CK map gives you an overview of how well rules are covered per technique (as of September 2026; Source: Detection Rules). How to read the map and how to find missing rules are left to the Cloud SIEM explainer. Mapping rules to techniques lets the person who receives a signal talk about "which stage of the attack this is" in a shared vocabulary.

How it differs from a monitor

A Monitor defines "notify me when this condition is met" as a pair of an evaluation expression and a notification, and the result appears as alert state transitions and notifications. A detection rule is likewise a conditional expression, but its output is not a state but a security signal, an individual record that carries a severity and on which the course of investigation and response accumulates. The management location is also different: rules are listed on product-specific pages under Security Settings, and edit permissions can be restricted per role / team / user (as of September 2026; Source: Detection Rules). For recipients, besides writing them into individual rules, there is a way to attach them collectively with security-side notification rules, which is a separate feature from the Notification Rules for monitors. It may look as though a log monitor could substitute for threat detection, but monitors have no severity-bearing records and no triage flow, and that is where the line is drawn.

3 points that matter in operation and the 15-month lifespan

Three points matter in operation. The first is tuning over-firing: using the option that lowers the severity by one level for signals whose environment tag starts with staging / test / dev makes it less likely that production HIGH signals get buried in noise from test environments. The second is validation: rules can be put through unit tests against sample logs, so you can confirm whether they would fire on events that have not yet occurred. The third is lifespan: Datadog reviews out-of-the-box rules periodically and issues a deprecation-date warning for rules it is retiring. Once 15 months (the same as the signal retention period) have passed after deprecation, the rule is deleted and can no longer be cloned (as of September 2026; Source: Create a Custom Rule / Detection Rules). The more heavily you rely on out-of-the-box rules, the more your operations need to make sure this warning is not missed.

Share