﻿---
title: Create rules from Discover
description: Turn an {{esql}} query in Discover into a {{alerting-v2}} rule with pre-filled evaluation and lookback.
url: https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/5528/explore-analyze/alerting/kibana-alerting-v2/rules/create-rule-from-discover-v2
products:
  - Kibana
applies_to:
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Unavailable
---

# Create rules from Discover
Create Kibana alerting v2 rules directly from Discover. When you build an ES|QL query that surfaces interesting patterns, you can convert it into a rule without rewriting the query. For the full rule form including preview, alert mode settings, and YAML toggle, refer to [Create rules using the rule builder](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/5528/explore-analyze/alerting/kibana-alerting-v2/rules/create-rule-from-rule-builder-v2).