﻿---
title: stack kb alerting get-alerting-rules-find cli command
description: Get information about rules Behaviour flags: --dry-run — validate all inputs and exit without performing any action 
url: https://www.elastic.co/elastic/docs-builder/docs/4075/reference/elastic-cli/cli/stack/kb/alerting/get-alerting-rules-find
applies_to:
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Preview
---

# stack kb alerting get-alerting-rules-find cli command
<cli-modifiers>
</cli-modifiers>

```bash
elastic stack kb alerting get-alerting-rules-find [options]
```

Get information about rules
**Behaviour flags:**
`--dry-run` — validate all inputs and exit without performing any action

## Options

<definitions>
  <definition term="--per-page number">
    The number of rules to return per page.
  </definition>
  <definition term="--page number">
    The page number to return.
  </definition>
  <definition term="--search string">
    An Elasticsearch simple_query_string query that filters the objects in the response.
  </definition>
  <definition term="--default-search-operator enum">
    The default operator to use for the simple_query_string.
    **Values:** OR, AND
  </definition>
  <definition term="--search-fields string[]">
    The fields to perform the simple_query_string parsed query against.
    **Repeatable:** pass `--search-fields` multiple times to supply more than one value
  </definition>
  <definition term="--sort-field string">
    Determines which field is used to sort the results. The field must exist in the `attributes` key of the response.
  </definition>
  <definition term="--sort-order enum">
    Determines the sort order.
    **Values:** asc, desc
  </definition>
  <definition term="--has-reference string">
    Filters the rules that have a relation with the reference objects with a specific type and identifier.
  </definition>
  <definition term="--fields string[]">
    The fields to return in the `attributes` key of the response.
    **Repeatable:** pass `--fields` multiple times to supply more than one value
  </definition>
  <definition term="--filter string">
    A KQL string that you filter with an attribute from your saved object. It should look like `savedObjectType.attributes.title: "myTitle"`. However, if you used a direct attribute of a saved object, such as `updatedAt`, you must define your filter, for example, `savedObjectType.updatedAt > 2018-12-22`.
  </definition>
  <definition term="--filter-consumers string[]">
    Filters the returned rules by the consumer (Kibana application) that owns them, for example: `siem`, `apm`, `infrastructure`.
    **Repeatable:** pass `--filter-consumers` multiple times to supply more than one value
  </definition>
  <definition term="--input-file string">
    path to a JSON file to use as command input
  </definition>
  <definition term="--dry-run">
    validate all inputs and exit without performing any action (preview changes without applying them)
  </definition>
</definitions>


## Global Options

<definitions>
  <definition term="--json">
    output as JSON
  </definition>
</definitions>