Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alert summaries and conditional actions #3245

Merged
merged 49 commits into from
May 22, 2023
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
38ade3a
New steps and variables
nastasha-solomon May 9, 2023
e815d50
Updating images, removing steps, and updating descrip
nastasha-solomon May 9, 2023
9ffef3a
Merge branch 'main' into issue-3142-actions-alert-sum
nastasha-solomon May 9, 2023
2e0820d
Refreshed additional image
nastasha-solomon May 9, 2023
d80738f
Fixed broken image
nastasha-solomon May 10, 2023
2953c37
Adding note about custom freq
nastasha-solomon May 10, 2023
a61c071
Update docs/detections/rules-ui-create.asciidoc
nastasha-solomon May 10, 2023
5578a18
Zhenia's feedback
nastasha-solomon May 10, 2023
3f108b7
Merge branch 'main' into issue-3142-actions-alert-sum
nastasha-solomon May 10, 2023
cb8baf0
Re-org placeholder fields
nastasha-solomon May 11, 2023
8ec69c8
initial crack at upgrade note
nastasha-solomon May 11, 2023
0f47e53
Minor revisions
nastasha-solomon May 11, 2023
9ae28e0
Update docs/detections/rules-ui-create.asciidoc
nastasha-solomon May 11, 2023
72f9d12
Zhenia's feedback pt 1
nastasha-solomon May 11, 2023
dcf6197
no moar dashes
nastasha-solomon May 11, 2023
aea23f7
Zhenia's feedback pt. 2
nastasha-solomon May 11, 2023
268d3e7
Minor revs
nastasha-solomon May 11, 2023
676b0a6
smol fix
nastasha-solomon May 11, 2023
fbe53de
Update docs/detections/rules-ui-manage.asciidoc
nastasha-solomon May 14, 2023
d9b0c4a
Feedback on var order
nastasha-solomon May 14, 2023
264b3c6
Merge branch 'main' into issue-3142-actions-alert-sum
nastasha-solomon May 14, 2023
639c5a5
Input from Maxim and Zhenia
nastasha-solomon May 16, 2023
9518026
Merge branch 'main' into issue-3142-actions-alert-sum
nastasha-solomon May 16, 2023
7b8fdd6
Update docs/detections/rules-ui-manage.asciidoc
nastasha-solomon May 17, 2023
3598789
Update docs/detections/rules-ui-manage.asciidoc
nastasha-solomon May 17, 2023
a3160a7
Update docs/upgrade/upgrade-security.asciidoc
nastasha-solomon May 17, 2023
169759e
Merge branch 'main' into issue-3142-actions-alert-sum
nastasha-solomon May 17, 2023
6c593ee
Merge branch 'main' into issue-3142-actions-alert-sum
nastasha-solomon May 18, 2023
6f1fbcc
Update docs/detections/rules-ui-create.asciidoc
nastasha-solomon May 21, 2023
458e067
Update docs/detections/rules-ui-create.asciidoc
nastasha-solomon May 21, 2023
c79a8f7
Update docs/detections/rules-ui-create.asciidoc
nastasha-solomon May 21, 2023
55552ba
Update docs/detections/rules-ui-create.asciidoc
nastasha-solomon May 21, 2023
a2b959b
Update docs/detections/rules-ui-create.asciidoc
nastasha-solomon May 21, 2023
cab7b24
Update docs/detections/rules-ui-create.asciidoc
nastasha-solomon May 21, 2023
a17b5b0
Update docs/detections/rules-ui-create.asciidoc
nastasha-solomon May 21, 2023
34d1f3b
Update docs/detections/rules-ui-create.asciidoc
nastasha-solomon May 21, 2023
bb95373
Update docs/detections/rules-ui-create.asciidoc
nastasha-solomon May 21, 2023
426c6ca
Update docs/detections/rules-ui-manage.asciidoc
nastasha-solomon May 21, 2023
ea32a59
Update docs/detections/rules-ui-manage.asciidoc
nastasha-solomon May 21, 2023
8a2663e
Update docs/upgrade/upgrade-security.asciidoc
nastasha-solomon May 21, 2023
eb84d6f
Update docs/detections/rules-ui-create.asciidoc
nastasha-solomon May 21, 2023
2fdb072
Update docs/detections/rules-ui-create.asciidoc
nastasha-solomon May 21, 2023
4ff8cd6
Update docs/detections/rules-ui-create.asciidoc
nastasha-solomon May 21, 2023
23b0f93
Update docs/detections/rules-ui-manage.asciidoc
nastasha-solomon May 21, 2023
771a20f
Update docs/detections/rules-ui-create.asciidoc
nastasha-solomon May 22, 2023
3eced23
Merge branch 'main' into issue-3142-actions-alert-sum
nastasha-solomon May 22, 2023
60f005b
Removing extra note
nastasha-solomon May 22, 2023
30ff86f
Update docs/detections/rules-ui-create.asciidoc
nastasha-solomon May 22, 2023
69bc675
Merge branch 'main' into issue-3142-actions-alert-sum
nastasha-solomon May 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified docs/detections/images/available-action-types.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/detections/images/selected-action-type.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
71 changes: 40 additions & 31 deletions docs/detections/rules-ui-create.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ run exactly at its scheduled time.
. Click *Continue*. The *Rule actions* pane is displayed.
+
[role="screenshot"]
image::images/rule-actions.png[]
image::images/available-action-types.png[Shows available connector types]
nastasha-solomon marked this conversation as resolved.
Show resolved Hide resolved

. Do either of the following:

Expand All @@ -476,37 +476,40 @@ are generated.
NOTE: To use {kib} Actions for alert notifications, you need the
https://www.elastic.co/subscriptions[appropriate license] and your role needs *All* privileges for the *Action and Connectors* feature. For more information, see <<case-permissions>>.

. Set when to send notifications:

* *On each rule execution*: Sends a notification every time new alerts are
generated.
* *Hourly*: Sends a notification every hour.
* *Daily*: Sends a notification every day.
* *Weekly*: Sends a notification every week.
+
NOTE: Notifications are sent only when new alerts are generated.
+
The available connector types are displayed.
[role="screenshot"]
image::images/available-action-types.png[Shows available connector types]

. Select the required connector type, which determines how notifications are sent. For example, if you select the {jira} connector, notifications are sent to your {jira} system.
. Select a connector type, which determines how notifications are sent. For example, if you select the {jira} connector, notifications are sent to your {jira} system.
nastasha-solomon marked this conversation as resolved.
Show resolved Hide resolved
+
NOTE: Each action type requires a connector. Connectors store the
information required to send the notification from the external system. You can
configure connectors while creating the rule or on the {kib} Rules and Connectors
page (*Stack Management* -> *Rules and Connectors* -> *Connectors*). For more
information, see {kibana-ref}/action-types.html[Action and connector types].
+
The selected connector type fields are displayed ({jira} example).
[role="screenshot"]
image::images/selected-action-type.png[]
image::images/available-action-types.png[Shows available connector types]
nastasha-solomon marked this conversation as resolved.
Show resolved Hide resolved

. After you select a connector, set its action frequency to define when notifications are sent:

** *Summary of alerts*: Select this option if want to reduce the number of notifications you receive without affecting their timeliness. Alert notifications that summarize alerts will be sent at your preferred time intervals.
nastasha-solomon marked this conversation as resolved.
Show resolved Hide resolved
+
. Fill in the fields for the selected connector types. For all connector types, click
the icon above the `Message` field to add
<<rule-action-variables, placeholders>> for rule and alert details to the
notifications.
NOTE: When setting a custom notification frequency, do not choose a time that is shorter than the rule's execution schedule.

** *For each alert*: Select this option to ensure notifications are sent every time new alerts are generated.

. (Optional) Specify additional conditions that need to be met for notifications to send. Click the toggle to enable a setting, then add the required details:

** *if alert matches query*: Enter a KQL query that defines field-value pairs or query conditions that must be met for notifications to send. The query only searches alert documents in the indices specified for the rule.
** *if alert is generated during timeframe*: Set timeframe details. Notifications are only sent if alerts are generated within the timeframe you define.
nastasha-solomon marked this conversation as resolved.
Show resolved Hide resolved
nastasha-solomon marked this conversation as resolved.
Show resolved Hide resolved

. Complete the required connector type fields ({jira} example).
nastasha-solomon marked this conversation as resolved.
Show resolved Hide resolved

+
[role="screenshot"]
image::images/selected-action-type.png[]


.. Use the default notification message or customize it. You can add more context to the message by clicking the icon above the message text box and selecting from a list of available <<rule-action-variables, placeholder variables>>.


. Create the rule with or without activation.
+
NOTE: When you activate a rule, it is queued, and its schedule is determined by
Expand All @@ -517,12 +520,14 @@ minutes at 14:03 but it does not run until 14:04, it will run again at 14:09.
[[rule-action-variables]]
==== Alert notification placeholders

You can use http://mustache.github.io/[mustache syntax] to add the following placeholders to <<rule-notifications, rule action>> fields:
You can use http://mustache.github.io/[mustache syntax] to add the following placeholders to <<rule-notifications, rule action>> fields. Different variables are provided based on the rule's action frequency.

If the rule’s action frequency is a summary of alerts, it passes variables that summarize alerts. Refer to {kibana-ref}/rule-action-variables.html#alert-summary-action-variables[Action frequency: Summary of alerts] for additional alert summary variables.

NOTE: The `{{context.rule.severity}}` and `{{context.rule.risk_score}}`
placeholders contain the rule's default values even when the *Severity override*
and *Risk score override* options are used.

* `{{alert.actionGroup}}`: Action group of the alert that scheduled actions for the rule
* `{{alert.actionGroupName}}`: Human readable name of the action group of the alert that scheduled actions for the rule
* `{{alert.actionSubgroup}}`: Action subgroup of the alert that scheduled actions for the rule
* `{{alert.id}}`: ID of the alert that scheduled actions for the rule
* `{{context.alerts}}`: Array of detected alerts
* `{{{context.results_link}}}`: URL to the alerts in {kib}
* `{{context.rule.anomaly_threshold}}`: Anomaly threshold score above which
Expand Down Expand Up @@ -558,11 +563,15 @@ used as an identifier across systems
* `{{rule.spaceId}}`: Space ID of the rule
* `{{rule.tags}}`: Tags of the rule
* `{{rule.type}}`: Type of rule
* `{{state.signals_count}}`: Number of alerts detected

NOTE: The `{{context.rule.severity}}` and `{{context.rule.risk_score}}`
placeholders contain the rule's default values even when the *Severity override*
and *Risk score override* options are used.
If the rule’s action frequency is not a summary of alerts (per each alert), it passes the following variables:
nastasha-solomon marked this conversation as resolved.
Show resolved Hide resolved

* `{{alert.actionGroup}}`: Action group of the alert that scheduled actions for the rule
* `{{alert.actionGroupName}}`: Human readable name of the action group of the alert that scheduled actions for the rule
nastasha-solomon marked this conversation as resolved.
Show resolved Hide resolved
* `{{alert.actionSubgroup}}`: Action subgroup of the alert that scheduled actions for the rule
* `{{alert.id}}`: ID of the alert that scheduled actions for the rule
* `{{alert.flapping}}: A flag on the alert that indicates whether the alert status is changing repeatedly.
* `{{state.signals_count}}`: Number of alerts detected
nastasha-solomon marked this conversation as resolved.
Show resolved Hide resolved
nastasha-solomon marked this conversation as resolved.
Show resolved Hide resolved

[float]
[[placeholder-examples]]
Expand Down
3 changes: 3 additions & 0 deletions docs/detections/rules-ui-manage.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ Similarly, rules will be skipped if they can't be modified by a bulk edit. For e
+
NOTE: The action frequency you select applies to all actions (both new and existing) on all selected rules. If you don't want to change the frequency of existing actions, update the rules separately.

+
IMPORTANT: In 8.8, action frequencies can be set for individual actions, and you can specify if notifications are sent when an alert is generated or at a custom alert summary interval. When you upgrade to 8.8, action-level frequency settings are applied to rules that have actions and were created in 8.7 or earlier. The frequency setting will default to the action frequency that was chosen for the rule before the upgrade.
nastasha-solomon marked this conversation as resolved.
Show resolved Hide resolved

** *Update rule schedules*: Update the <<rule-schedule,schedules>> and look-back times on all selected rules.
** *Apply Timeline template*: Apply a specified <<timeline-templates-ui, Timeline template>> to the selected rules. You can also choose *None* to remove Timeline templates from the selected rules.
. On the flyout that opens, update the settings.
Expand Down
5 changes: 5 additions & 0 deletions docs/upgrade/upgrade-security.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,8 @@ Changes to the indicator match rule's <<rule-ui-advanced-params, default threat
* If an existing indicator match rule was configured to use threat indicator indices generated from {filebeat} version 7.x, updating the default threat indicator path to `threat.indicator` after you upgrade to {stack} version 8.x and {agent} or {filebeat} version 8.x configures the rule to use threat indicator indices generated by those later versions.
* You must create separate rules to query threat intelligence indices created by {filebeat} version 7.x and version 8.x because each version requires a different default threat indicator path value. Review the recommendations for <<query-alert-indices, querying alert indices>>.

[float]
[[rule-action-upgrade]]
=== Updates to rule actions

In 8.8, <<rule-notifications,rule action frequencies>> can be set for individual actions, and you can specify if notifications are sent when an alert is generated or at a custom alert summary interval. When you upgrade to 8.8, action-level frequency settings are applied to rules that have actions and were created in 8.7 or earlier. The frequency setting will default to the action frequency that was selected for the rule before you upgraded.