Detection
Detection finds problems that your alerts miss, and you don't need to create rules to find them. Elastic nightshift learns which services and dependencies your logs describe, generates its own rules, and watches for unusual changes. When related changes show up across several services, it groups them into a single significant event that shows which services and databases are affected, giving you one problem to look at instead of multiple small alerts.
Turn detection on once and choose the data that it watches. After that, it runs in the background.
Open detection from the home page by selecting Detections or using the global search field. The Signals and Topology tabs on the Detections page are only available in developer mode.
- You choose the data. A source is an ES|QL query that selects the logs to watch, such as all logs with
FROM logs*. - Elastic nightshift learns your system. It samples each source and extracts Knowledge Indicators (KIs), facts such as the language a service is written in and the database it uses.
- It writes rules. From the KIs, it generates ES|QL rules that look for failure patterns in your services, such as lock timeouts in a database. High-severity match query KIs become rules automatically, and you can promote others. Refer to Where rules come from.
- Rules produce signals. Rules run on a schedule. When the rate at which a rule matches changes significantly, for example a sudden spike, detection records a signal.
- Discovery checks the signals. Discovery reviews related signals together with your KIs and current data, and tests whether they point to a real, current problem.
- Elastic nightshift raises a significant event. When discovery confirms a problem, or can't rule it out, it opens a significant event with a summary, a severity, and a confidence.
- You investigate. Start an investigation from the event to find the likely cause, or let an automation start it for you.
For example, when a database starts to time out on locks, the rules for database lock timeouts, for statement timeouts in the service that uses it, and for slow requests to that service can all spike at once. Instead of three alerts, you get one significant event, with all three signals as its evidence.
| Term | What it is | Where you find it |
|---|---|---|
| Source | An ES|QL query that selects the data that detection watches. | Sources page |
| Knowledge Indicator (KI) | A fact that Elastic nightshift extracted from a source, such as a service, a database, or a dependency. Some KIs are queries that can become rules. | Knowledge → Knowledge Indicators |
| Entity | A service, database, or other component that Elastic nightshift learned from your KIs. | Entities list on the Detections page |
| Rule | An ES|QL query that runs on a schedule and counts the log lines that match one failure pattern. | Rules tab |
| Signal | A record that a rule's match rate changed significantly. Signals don't need any action from you. | Signals tab (developer mode), and the Detections list of each event |
| Significant event | A problem that discovery confirmed from one or more signals, with a severity, a confidence, and a status. | Events tab |
A significant event is an alert. You can route it to your team and act on it like any other alert, and an automation can investigate it. Refer to Route significant events and investigate them automatically.
- It starts only when you ask. Detection doesn't run until someone with the privileges to manage sources selects the data to watch. Refer to Manage what detection monitors.
- It's optimized for logs. Detection works best with logs. Sources for metrics or traces work, but in Tech Preview, results are best with logs. Sources apply to detection only: investigations query your logs, metrics, and traces without one. Refer to What a source is.
- It watches data that this project can reach with ES|QL. That is your project and any project linked through cross-project search. Detection doesn't use connectors, so the External Elasticsearch connector only helps investigations. For what works with each deployment type, refer to Reference architecture.
- It needs time to learn. Expect the first KIs and rules within a few minutes, and the first signals 40 minutes to about 2.5 hours after you turn it on, while the rules warm up. After the warm-up, detection takes about 10 to 30 minutes to detect a change. Significant events appear only when something actually changes. Refer to How long learning takes.
- It doesn't change your environment. Detection reads your data and raises events. It doesn't investigate them unless you or an automation starts an investigation.
- It can be wrong. Each event shows its confidence and the signals behind it, so you can check why it was raised. Refer to Check the evidence before you act.
Detection uses model tokens to learn KIs and run discovery. Cost grows with the number of sources, the amount of data, and how often learning runs. To limit it, refer to What uses tokens. Rules also run as ES|QL queries against your data every few minutes. For the query load and storage, refer to the Operator guide.
To work with detection, start from what you want to do:
- To turn on detection and choose the data it watches, refer to Manage what detection monitors.
- To understand what Elastic nightshift learned about your system, refer to How detection learns your system.
- To check the rules behind an event, or remove a noisy rule, refer to Rules and signals.
- To review significant events and investigate them, refer to Review significant events.
- Detect problems your alerts miss: Follow the end-to-end use case, from turning detection on to your first investigated event.
- Operator guide: Check system impact, cost drivers, and recovery procedures.