@@ -10,10 +10,11 @@ of following its default behavior. To specify the _when_ a rule uses
1010a `scope` and `conditions`. You can think of `scope` as the categorical
1111specification of a rule, while `conditions` are the numerical part.
1212A rule can have a scope, one or more conditions, or a combination of
13- scope and conditions.
14-
15- Let us see how those can be configured by examples .
13+ scope and conditions. For the full list of specification details, see the
14+ {ref}/ml-put-job.html#put-customrules[`custom_rules` object] in the create
15+ {anomaly-jobs} API .
1616
17+ [[ml-custom-rules-scope]]
1718==== Specifying custom rule scope
1819
1920Let us assume we are configuring an {anomaly-job} in order to detect DNS data
@@ -29,7 +30,8 @@ to achieve this.
2930First, we need to create a list of our safe domains. Those lists are called
3031_filters_ in {ml}. Filters can be shared across {anomaly-jobs}.
3132
32- We create our filter using the {ref}/ml-put-filter.html[put filter API]:
33+ You can create a filter in **Anomaly Detection > Settings > Filter Lists** in
34+ {kib} or by using the {ref}/ml-put-filter.html[put filter API]:
3335
3436[source,console]
3537----------------------------------
@@ -42,7 +44,7 @@ PUT _ml/filters/safe_domains
4244// TEST[skip:needs-licence]
4345
4446Now, we can create our {anomaly-job} specifying a scope that uses the
45- `safe_domains` filter for the `highest_registered_domain` field:
47+ `safe_domains` filter for the `highest_registered_domain` field:
4648
4749[source,console]
4850----------------------------------
@@ -73,7 +75,8 @@ PUT _ml/anomaly_detectors/dns_exfiltration_with_rule
7375// TEST[skip:needs-licence]
7476
7577As time advances and we see more data and more results, we might encounter new
76- domains that we want to add in the filter. We can do that by using the
78+ domains that we want to add in the filter. We can do that in the
79+ **Anomaly Detection > Settings > Filter Lists** in {kib} or by using the
7780{ref}/ml-update-filter.html[update filter API]:
7881
7982[source,console]
@@ -127,6 +130,7 @@ PUT _ml/anomaly_detectors/scoping_multiple_fields
127130Such a detector will skip results when the values of all 3 scoped fields
128131are included in the referenced filters.
129132
133+ [[ml-custom-rules-conditions]]
130134==== Specifying custom rule conditions
131135
132136Imagine a detector that looks for anomalies in CPU utilization.
@@ -206,16 +210,18 @@ PUT _ml/anomaly_detectors/rule_with_range
206210----------------------------------
207211// TEST[skip:needs-licence]
208212
209- ==== Custom rules in the life-cycle of a job
213+ [[ml-custom-rules-lifecycle]]
214+ ==== Custom rules in the lifecycle of a job
210215
211216Custom rules only affect results created after the rules were applied.
212217Let us imagine that we have configured an {anomaly-job} and it has been running
213218for some time. After observing its results we decide that we can employ
214219rules in order to get rid of some uninteresting results. We can use
215220the {ref}/ml-update-job.html[update {anomaly-job} API] to do so. However, the
216221rule we added will only be in effect for any results created from the moment we
217- added the rule onwards. Past results will remain unaffected.
222+ added the rule onwards. Past results will remain unaffected.
218223
224+ [[ml-custom-rules-filtering]]
219225==== Using custom rules vs. filtering data
220226
221227It might appear like using rules is just another way of filtering the data
0 commit comments