Skip to content

Commit

Permalink
First draft
Browse files Browse the repository at this point in the history
  • Loading branch information
nastasha-solomon committed Mar 7, 2024
1 parent daf5aba commit fba0ecf
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 6 deletions.
23 changes: 17 additions & 6 deletions docs/detections/alert-suppression.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Alert suppression allows you to reduce the number of repeated or duplicate detec

* <<create-custom-rule,Custom query>>
* <<create-threshold-rule,Threshold>>
* <<create-indicator-rule,Indicator match>>

Normally, when a rule meets its criteria repeatedly, it creates multiple alerts, one for each time the rule's criteria are met. When alert suppression is configured, duplicate qualifying events are grouped, and only one alert is created for each group. Depending on the rule type, you can configure alert suppression to create alerts each time the rule runs, or once within a specified time window. You can also specify multiple fields to group events by unique combinations of values.

Expand All @@ -22,35 +23,45 @@ NOTE: Alert suppression is not available for Elastic prebuilt rules. However, if

=== Configure alert suppression

You can configure alert suppression when you create or edit a supported rule type. Refer to <<create-custom-rule>> or <<create-threshold-rule>> for detailed instructions.
You can configure alert suppression when you create or edit a supported rule type. Refer to <<create-custom-rule>>, <<create-threshold-rule>>, or <<create-indicator-rule>> for detailed instructions.

. When configuring the rule type (the *Define rule* step for a new rule, or the *Definition* tab for an existing rule), specify how you want to group events for alert suppression:
+
--
* Custom query rule: In *Suppress alerts by*, enter 1-3 field names to group events by the fields' values.
* Threshold rule: In *Group by*, enter up to 3 field names to group events by the fields' values, or leave the setting empty to group all qualifying events together.
* Custom query rule: In *Suppress alerts by*, enter 1-3 field names to group events by the fields' values. When alerts are generated, there is no limit to the total amount that can be suppressed.
* Threshold rule: In *Group by*, enter up to 3 field names to group events by the fields' values, or leave the setting empty to group all qualifying events together. When alerts are generated, the maximum number that can be suppressed is the <<opt-fields-all,`max_signals`>> value. By default, the number is `100`.
--
+
NOTE: If you specify a field with multiple values, an alert grouping is created for each value. For example, if you suppress alerts by `destination.ip` of `[127.0.0.1, 127.0.0.2, 127.0.0.3]`, alerts will be suppressed separately for each value of `127.0.0.1`, `127.0.0.2`, and `127.0.0.3`.

* Indicator match rule: In *Suppress alerts by*, enter 1-3 field names to group events by the fields' values. When alerts are generated, there is no limit to the total amount that can be suppressed.
+
NOTE: If you specify a field with multiple values, an alert grouping is created for alerts that contain the array you specified. For example, if you suppress alerts by `destination.ip` of `[127.0.0.1, 127.0.0.2, 127.0.0.3]`, alerts that contain this array are grouped and suppressed.

. If available, select how often to create alerts for duplicate events:
+
--
* *Per rule execution*: (Custom query rules only) Create an alert each time the rule runs and meets its criteria.
* *Per rule execution*: (Only available for custom query rules and indicator match rules) Create an alert each time the rule runs and meets its criteria.
* *Per time period*: Create one alert for all qualifying events within a specified time window, beginning when the rule first meets its criteria and creates the alert. (This is the only option available for threshold rules.)
+
For example, if a rule runs every 5 minutes but you don't need alerts that frequently, you can set the suppression time period to a longer time, such as 1 hour. If the rule meets its criteria, it creates an alert at that time, and for the next hour, it'll suppress any subsequent qualifying events.
+
image::images/alert-suppression-options.png[Alert suppression options,400]
--

. (Custom query rules only) Under *If a suppression field is missing*, choose how to handle events with missing suppression fields (events in which one or more of the *Suppress alerts by* fields don't exist):
. (Only available for custom query rules and indicator match rules) Under *If a suppression field is missing*, choose how to handle events with missing suppression fields (events in which one or more of the *Suppress alerts by* fields don't exist):
* *Suppress and group alerts for events with missing fields*: Create one alert for each group of events with missing fields. Missing fields get a `null` value, which is used to group and suppress alerts.
* *Do not suppress alerts for events with missing fields*: Create a separate alert for each matching event. This basically falls back to normal alert creation for events with missing suppression fields.

. Configure other rule settings, then save and enable the rule.

TIP: Use the *Rule preview* before saving the rule to visualize how alert suppression will affect the alerts created, based on historical data.
[TIP]
====
* Use the *Rule preview* before saving the rule to visualize how alert suppression will affect the alerts created, based on historical data.
* If a rule times out while suppression is turned on, try shortening the rule's <<rule-schedule,look-back>> time or turn off suppression to improve the rule's performance.
====

=== Confirm suppressed alerts

Expand Down
20 changes: 20 additions & 0 deletions docs/detections/api/rules/rules-api-create.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,26 @@ preview::[]

|==============================================

====== Indicator match rule

[width="100%",options="header"]
|==============================================
|Name |Type |Description

|alert_suppression |Object a|Defines alert suppression configuration. Available fields:

* `group_by` (string[], required): An array of 1-3 field names to use for suppressing alerts.

* `duration` (<<alert-suppression-duration-schema, duration object>>, optional): The time period in which alerts will be suppressed, beginning when the rule first meets its criteria and creates the alert. If not specified, alerts will be suppressed on rule execution only.

* `missing_fields_strategy` (string, optional): Defines how to handle events with missing suppression fields. Possible values:

- `doNotSuppress`: Create a separate alert for each matching event.

- `suppress`: Create one alert for each group of events with missing fields.

|==============================================

[[actions-object-schema]]
===== `actions` schema

Expand Down
20 changes: 20 additions & 0 deletions docs/detections/api/rules/rules-api-update.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,26 @@ preview::[]

|==============================================

====== Indicator match rule

[width="100%",options="header"]
|==============================================
|Name |Type |Description

|alert_suppression |Object a|Defines alert suppression configuration. Available fields:

* `group_by` (string[], required): An array of 1-3 field names to use for suppressing alerts.

* `duration` (<<alert-suppression-duration-schema, duration object>>, optional): The time period in which alerts will be suppressed, beginning when the rule first meets its criteria and creates the alert. If not specified, alerts will be suppressed on rule execution only.

* `missing_fields_strategy` (string, optional): Defines how to handle events with missing suppression fields. Possible values:

- `doNotSuppress`: Create a separate alert for each matching event.

- `suppress`: Create one alert for each group of events with missing fields.

|==============================================


===== Example request

Expand Down

0 comments on commit fba0ecf

Please sign in to comment.