﻿---
title: Rule type guides
description: Learn when to use each detection rule type and access detailed guides for custom query, EQL, threshold, and more.
url: https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/5498/solutions/security/detect-and-alert/rule-types
products:
  - Elastic Cloud Serverless
  - Elastic Security
applies_to:
  - Serverless Security projects: Generally available
  - Elastic Stack: Generally available
---

# Rule type guides
Elastic Security provides several rule types for building detections. Each rule type page covers when to use it, how to write effective queries, real-world examples, and field configuration specific to that type.

| What you want to detect                            | Rule type                                                                                                                                   |
|----------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|
| Aggregated, transformed, or computed conditions    | [ES|QL](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/5498/solutions/security/detect-and-alert/esql)                        |
| A known field value, pattern, or boolean condition | [Custom query](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/5498/solutions/security/detect-and-alert/custom-query)         |
| An ordered sequence of events or a missing event   | [Event correlation (EQL)](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/5498/solutions/security/detect-and-alert/eql)       |
| Events matching a known threat indicator           | [Indicator match](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/5498/solutions/security/detect-and-alert/indicator-match)   |
| A field value count exceeding a boundary           | [Threshold](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/5498/solutions/security/detect-and-alert/threshold)               |
| Behavioral anomalies without a fixed pattern       | [Machine learning](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/5498/solutions/security/detect-and-alert/machine-learning) |
| A field value appearing for the first time         | [New terms](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/5498/solutions/security/detect-and-alert/new-terms)               |

<tip>
  Still unsure which rule type fits your use case? Refer to [Choose the right rule type](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/5498/solutions/security/detect-and-alert/choose-the-right-rule-type) for a decision guide comparing all rule types.
</tip>