Skip to content

Commit 798f6af

Browse files
[DOCS] [7.16] Provide more details on how to start ML job to avoid ML detection rule execution failure (#1160) (#1219)
* First draft * Adds to both rule creation and troubleshooting topics * Adds new screenshots to highlight the correct feature to use * Update rule-start-ml-job.png * Corrects name of custom query rule * Update docs/troubleshooting/detections/detection-rules.asciidoc Co-authored-by: Janeen Mikell-Straughn <[email protected]> Co-authored-by: Janeen Mikell-Straughn <[email protected]> (cherry picked from commit b91a2a0) Co-authored-by: Joe Peeples <[email protected]>
1 parent aa3fd85 commit 798f6af

File tree

5 files changed

+41
-10
lines changed

5 files changed

+41
-10
lines changed
725 KB
Loading

docs/detections/rules-ui-create.asciidoc

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,6 @@ Rules run periodically and search for source events, matches, sequences, or {ml}
66
that meet their criteria. When a rule's criteria are met, a detection alert is
77
created.
88

9-
[IMPORTANT]
10-
==============
11-
To create or edit {ml} rules, you must have the
12-
https://www.elastic.co/subscriptions[appropriate license] or use a
13-
{ess-trial}[cloud deployment]. Additionally, you must have the
14-
{ref}/built-in-roles.html[`machine_learning_admin`] user role, and the selected
15-
{ml} job must be running for the rule to function correctly.
16-
==============
17-
189
You can create the following types of rules:
1910

2011
* <<create-custom-rule, *Custom query*>>: Query-based rule, which searches the defined indices and
@@ -108,15 +99,30 @@ image::images/create-new-rule.png[]
10899
[discrete]
109100
[[create-ml-rule]]
110101
==== Create a machine learning rule
102+
103+
[IMPORTANT]
104+
==============
105+
To create or edit {ml} rules, you must have the https://www.elastic.co/subscriptions[appropriate license] or use a
106+
{ess-trial}[cloud deployment]. Additionally, you must have the {ref}/built-in-roles.html[`machine_learning_admin`] user
107+
role, and the selected {ml} job must be running for the rule to function correctly.
108+
==============
109+
111110
. To create a rule based on a {ml} anomaly threshold, select *Machine Learning*,
112111
then select:
113112
.. The required {ml} job(s).
114113
.. The anomaly score threshold above which alerts are created.
114+
. Make sure that the {ml} jobs required for the rule are running. If a required {ml} job is not running, an alert is displayed.
115+
.. Select **ML job settings** in the upper-right corner of the page, then search for the required {ml} job.
116+
.. Turn on the **Run job** switch for the required {ml} job.
117+
+
118+
[role="screenshot"]
119+
image::images/rule-start-ml-job.png[]
120+
+
115121
. Click **Continue**, then proceed with <<rule-ui-basic-params, configuring basic rule settings>>.
116122

117123
[discrete]
118124
[[create-custom-rule]]
119-
==== Create a custom rule
125+
==== Create a custom query rule
120126
. To create a rule based on a KQL or Lucene query, select *Custom query*,
121127
then:
122128
.. Define which {es} indices the rule searches for alerts.

docs/troubleshooting/detections/detection-rules.asciidoc

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,31 @@
33

44
This topic covers common troubleshooting issues when creating or managing <<rules-ui-create, detection rules>>.
55

6+
[discrete]
7+
[[ML-rules-ts]]
8+
=== {ml-cap} rules
9+
10+
[discrete]
11+
[[start-ML-jobs-ts]]
12+
.{ml-cap} rule is failing and a required {ml} job is stopped
13+
[%collapsible]
14+
====
15+
If a {ml} rule is failing, check to make sure the required {ml} jobs are running and start any jobs that have stopped.
16+
17+
. Go to **Detect** -> **Rules**, then select the {ml} rule. The required {ml} jobs and their statuses are listed in the Definition section.
18+
+
19+
[role="screenshot"]
20+
image::images/rules-ts-ml-job-stopped.png[]
21+
+
22+
. If a required {ml} job isn't running, select **ML job settings** in the upper-right corner of the page, then search for the {ml} job.
23+
. Turn on the **Run job** switch for the required {ml} job.
24+
+
25+
[role="screenshot"]
26+
image::images/rules-ts-start-ml-job.png[]
27+
+
28+
. Rerun the {ml} detection rule.
29+
====
30+
631
[discrete]
732
[[IM-match-rules-ts]]
833
=== Indicator match rules
677 KB
Loading
866 KB
Loading

0 commit comments

Comments
 (0)