You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: explore-analyze/machine-learning/anomaly-detection/ml-configuring-alerts.md
+360Lines changed: 360 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,3 +23,363 @@ If you have created rules for specific {{anomaly-jobs}} and you want to monitor
23
23
::::
24
24
25
25
In **{{stack-manage-app}} > {{rules-ui}}**, you can create both types of {{ml}} rules. In the **{{ml-app}}** app, you can create only {{anomaly-detect}} alert rules; create them from the {{anomaly-job}} wizard after you start the job or from the {{anomaly-job}} list.
Every {{anomaly-detect}} alert has the following action variables:
213
+
214
+
**`context.anomalyExplorerUrl`^*^**
215
+
: URL to open in the Anomaly Explorer.
216
+
217
+
**`context.isInterim`**
218
+
: Indicates if top hits contain interim results.
219
+
220
+
**`context.jobIds`^*^**
221
+
: List of job IDs that triggered the alert.
222
+
223
+
**`context.message`^*^**
224
+
: A preconstructed message for the alert.
225
+
226
+
**`context.score`**
227
+
: Anomaly score at the time of the notification action.
228
+
229
+
**`context.timestamp`**
230
+
: The bucket timestamp of the anomaly.
231
+
232
+
**`context.timestampIso8601`**
233
+
: The bucket timestamp of the anomaly in ISO8601 format.
234
+
235
+
**`context.topInfluencers`**
236
+
: The list of top influencers. Limited to a maximum of 3 documents.
237
+
238
+
:::{dropdown} Properties of `context.topInfluencers`
239
+
**`influencer_field_name`**
240
+
: The field name of the influencer.
241
+
242
+
**`influencer_field_value`**
243
+
: The entity that influenced, contributed to, or was to blame for the anomaly.
244
+
245
+
**`score`**
246
+
: The influencer score. A normalized score between 0–100 which shows the influencer’s overall contribution to the anomalies.
247
+
:::
248
+
249
+
**`context.topRecords`**
250
+
: The list of top records. Limited to a maximum of 3 documents.
251
+
252
+
:::{dropdown} Properties of `context.topRecords`
253
+
**`actual`**
254
+
: The actual value for the bucket.
255
+
256
+
**`by_field_value`**
257
+
: The value of the by field.
258
+
259
+
**`field_name`**
260
+
: Certain functions require a field to operate on, for example, `sum()`. For those functions, this value is the name of the field to be analyzed.
261
+
262
+
**`function`**
263
+
: The function in which the anomaly occurs, as specified in the detector configuration. For example, `max`.
264
+
265
+
**`over_field_name`**
266
+
: The field used to split the data.
267
+
268
+
**`partition_field_value`**
269
+
: The field used to segment the analysis.
270
+
271
+
**`score`**
272
+
: A normalized score between 0–100, which is based on the probability of the anomalousness of this record.
273
+
274
+
**`typical`**
275
+
: The typical value for the bucket, according to analytical modeling.
276
+
:::
277
+
278
+
### {{anomaly-detect-cap}} health action variables [anomaly-jobs-health-action-variables]
279
+
280
+
Every health check has two main variables: `context.message` and
281
+
`context.results`. The properties of `context.results` may vary based on the
282
+
type of check. You can find the possible properties for all the checks below.
283
+
284
+
#### Datafeed is not started
285
+
286
+
**`context.message`^*^**
287
+
: A preconstructed message for the alert.
288
+
289
+
**`context.results`**
290
+
: Contains the following properties:
291
+
292
+
:::{dropdown} Properties of `context.results`
293
+
**`datafeed_id`^*^**
294
+
: The datafeed identifier.
295
+
296
+
**`datafeed_state`^*^**
297
+
: The state of the datafeed. It can be `starting`, `started`, `stopping`, or `stopped`.
298
+
299
+
**`job_id`^*^**
300
+
: The job identifier.
301
+
302
+
**`job_state`^*^**
303
+
: The state of the job. It can be `opening`, `opened`, `closing`, `closed`, or `failed`.
304
+
:::
305
+
306
+
#### Model memory limit reached
307
+
308
+
**`context.message`^*^**
309
+
: A preconstructed message for the rule.
310
+
311
+
**`context.results`**
312
+
: Contains the following properties:
313
+
314
+
:::{dropdown} Properties of `context.results`
315
+
**`job_id`^*^**
316
+
: The job identifier.
317
+
318
+
**`memory_status`^*^**
319
+
: The status of the mathematical model. It can have one of the following values:
320
+
- `soft_limit`: The model used more than 60% of the configured memory limit and older unused models will be pruned to free up space. In categorization jobs, no further category examples will be stored.
321
+
- `hard_limit`: The model used more space than the configured memory limit. As a result, not all incoming data was processed.
322
+
The `memory_status` is `ok` for recovered alerts.
323
+
324
+
**`model_bytes`^*^**
325
+
: The number of bytes of memory used by the models.
326
+
327
+
**`model_bytes_exceeded`^*^**
328
+
: The number of bytes over the high limit for memory usage at the last allocation failure.
329
+
330
+
**`model_bytes_memory_limit`^*^**
331
+
: The upper limit for model memory usage.
332
+
333
+
**`log_time`^*^**
334
+
: The timestamp of the model size statistics according to server time. Time formatting is based on the Kibana settings.
335
+
336
+
**`peak_model_bytes`^*^**
337
+
: The peak number of bytes of memory ever used by the model.
338
+
:::
339
+
340
+
#### Data delay has occurred
341
+
342
+
**`context.message`^*^**
343
+
: A preconstructed message for the rule.
344
+
345
+
**`context.results`**
346
+
: For recovered alerts, `context.results` is either empty (when there is no delayed data) or the same as for an active alert (when the number of missing documents is less than the *Number of documents* threshold set by the user).
347
+
Contains the following properties:
348
+
349
+
:::{dropdown} Properties of `context.results`
350
+
**`annotation`^*^**
351
+
: The annotation corresponding to the data delay in the job.
352
+
353
+
**`end_timestamp`^*^**
354
+
: Timestamp of the latest finalized buckets with missing documents. Time formatting is based on the Kibana settings.
355
+
356
+
**`job_id`^*^**
357
+
: The job identifier.
358
+
359
+
**`missed_docs_count`^*^**
360
+
: The number of missed documents.
361
+
:::
362
+
363
+
#### Error in job messages
364
+
365
+
**`context.message`^*^**
366
+
: A preconstructed message for the rule.
367
+
368
+
**`context.results`**
369
+
: Contains the following properties:
370
+
371
+
:::{dropdown} Properties of `context.results`
372
+
**`timestamp`**
373
+
: Timestamp of the latest finalized buckets with missing documents.
0 commit comments