ml-shared.asciidoc 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128
  1. tag::aggregations[]
  2. If set, the {dfeed} performs aggregation searches. Support for aggregations is
  3. limited and should only be used with low cardinality data. For more information,
  4. see
  5. {stack-ov}/ml-configuring-aggregation.html[Aggregating data for faster performance].
  6. end::aggregations[]
  7. tag::allow-lazy-open[]
  8. Advanced configuration option. Specifies whether this job can open when there is
  9. insufficient {ml} node capacity for it to be immediately assigned to a node. The
  10. default value is `false`; if a {ml} node with capacity to run the job cannot
  11. immediately be found, the <<ml-open-job,open {anomaly-jobs} API>> returns an
  12. error. However, this is also subject to the cluster-wide
  13. `xpack.ml.max_lazy_ml_nodes` setting; see <<advanced-ml-settings>>. If this
  14. option is set to `true`, the <<ml-open-job,open {anomaly-jobs} API>> does not
  15. return an error and the job waits in the `opening` state until sufficient {ml}
  16. node capacity is available.
  17. end::allow-lazy-open[]
  18. tag::allow-lazy-start[]
  19. Whether this job should be allowed to start when there is insufficient {ml} node
  20. capacity for it to be immediately assigned to a node. The default is `false`,
  21. which means that the <<start-dfanalytics>> will return an error if a {ml} node
  22. with capacity to run the job cannot immediately be found. (However, this is also
  23. subject to the cluster-wide `xpack.ml.max_lazy_ml_nodes` setting - see
  24. <<advanced-ml-settings>>.) If this option is set to `true` then the
  25. <<start-dfanalytics>> will not return an error, and the job will wait in the
  26. `starting` state until sufficient {ml} node capacity is available.
  27. end::allow-lazy-start[]
  28. tag::allow-no-datafeeds[]
  29. Specifies what to do when the request:
  30. +
  31. --
  32. * Contains wildcard expressions and there are no {dfeeds} that match.
  33. * Contains the `_all` string or no identifiers and there are no matches.
  34. * Contains wildcard expressions and there are only partial matches.
  35. The default value is `true`, which returns an empty `datafeeds` array when
  36. there are no matches and the subset of results when there are partial matches.
  37. If this parameter is `false`, the request returns a `404` status code when there
  38. are no matches or only partial matches.
  39. --
  40. end::allow-no-datafeeds[]
  41. tag::allow-no-jobs[]
  42. Specifies what to do when the request:
  43. +
  44. --
  45. * Contains wildcard expressions and there are no jobs that match.
  46. * Contains the `_all` string or no identifiers and there are no matches.
  47. * Contains wildcard expressions and there are only partial matches.
  48. The default value is `true`, which returns an empty `jobs` array
  49. when there are no matches and the subset of results when there are partial
  50. matches. If this parameter is `false`, the request returns a `404` status code
  51. when there are no matches or only partial matches.
  52. --
  53. end::allow-no-jobs[]
  54. tag::allow-no-match[]
  55. Specifies what to do when the request:
  56. +
  57. --
  58. * Contains wildcard expressions and there are no {dfanalytics-jobs} that match.
  59. * Contains the `_all` string or no identifiers and there are no matches.
  60. * Contains wildcard expressions and there are only partial matches.
  61. The default value is `true`, which returns an empty `data_frame_analytics` array
  62. when there are no matches and the subset of results when there are partial
  63. matches. If this parameter is `false`, the request returns a `404` status code
  64. when there are no matches or only partial matches.
  65. --
  66. end::allow-no-match[]
  67. tag::analysis[]
  68. Defines the type of {dfanalytics} you want to perform on your source index. For
  69. example: `outlier_detection`. See <<ml-dfa-analysis-objects>>.
  70. end::analysis[]
  71. tag::analysis-config[]
  72. The analysis configuration, which specifies how to analyze the data.
  73. After you create a job, you cannot change the analysis configuration; all
  74. the properties are informational. An analysis configuration object has the
  75. following properties:
  76. `bucket_span`:::
  77. (<<time-units,time units>>)
  78. include::{docdir}/ml/ml-shared.asciidoc[tag=bucket-span]
  79. `categorization_field_name`:::
  80. (string)
  81. include::{docdir}/ml/ml-shared.asciidoc[tag=categorization-field-name]
  82. `categorization_filters`:::
  83. (array of strings)
  84. include::{docdir}/ml/ml-shared.asciidoc[tag=categorization-filters]
  85. `categorization_analyzer`:::
  86. (object or string)
  87. include::{docdir}/ml/ml-shared.asciidoc[tag=categorization-analyzer]
  88. `detectors`:::
  89. (array) An array of detector configuration objects. Detector configuration
  90. objects specify which data fields a job analyzes. They also specify which
  91. analytical functions are used. You can specify multiple detectors for a job.
  92. include::{docdir}/ml/ml-shared.asciidoc[tag=detector]
  93. +
  94. --
  95. NOTE: If the `detectors` array does not contain at least one detector,
  96. no analysis can occur and an error is returned.
  97. --
  98. `influencers`:::
  99. (array of strings)
  100. include::{docdir}/ml/ml-shared.asciidoc[tag=influencers]
  101. `latency`:::
  102. (time units)
  103. include::{docdir}/ml/ml-shared.asciidoc[tag=latency]
  104. `multivariate_by_fields`:::
  105. (boolean)
  106. include::{docdir}/ml/ml-shared.asciidoc[tag=multivariate-by-fields]
  107. `summary_count_field_name`:::
  108. (string)
  109. include::{docdir}/ml/ml-shared.asciidoc[tag=summary-count-field-name]
  110. end::analysis-config[]
  111. tag::analysis-limits[]
  112. Limits can be applied for the resources required to hold the mathematical models
  113. in memory. These limits are approximate and can be set per job. They do not
  114. control the memory used by other processes, for example the {es} Java
  115. processes. If necessary, you can increase the limits after the job is created.
  116. The `analysis_limits` object has the following properties:
  117. `categorization_examples_limit`:::
  118. (long)
  119. include::{docdir}/ml/ml-shared.asciidoc[tag=categorization-examples-limit]
  120. `model_memory_limit`:::
  121. (long or string)
  122. include::{docdir}/ml/ml-shared.asciidoc[tag=model-memory-limit]
  123. end::analysis-limits[]
  124. tag::analyzed-fields[]
  125. Specify `includes` and/or `excludes` patterns to select which fields will be
  126. included in the analysis. If `analyzed_fields` is not set, only the relevant
  127. fields will be included. For example, all the numeric fields for {oldetection}.
  128. For the supported field types, see <<ml-put-dfanalytics-supported-fields>>. Also
  129. see the <<explain-dfanalytics>> which helps understand field selection.
  130. `includes`:::
  131. (Optional, array) An array of strings that defines the fields that will be
  132. included in the analysis.
  133. `excludes`:::
  134. (Optional, array) An array of strings that defines the fields that will be
  135. excluded from the analysis. You do not need to add fields with unsupported
  136. data types to `excludes`, these fields are excluded from the analysis
  137. automatically.
  138. end::analyzed-fields[]
  139. tag::background-persist-interval[]
  140. Advanced configuration option. The time between each periodic persistence of the
  141. model. The default value is a randomized value between 3 to 4 hours, which
  142. avoids all jobs persisting at exactly the same time. The smallest allowed value
  143. is 1 hour.
  144. +
  145. --
  146. TIP: For very large models (several GB), persistence could take 10-20 minutes,
  147. so do not set the `background_persist_interval` value too low.
  148. --
  149. end::background-persist-interval[]
  150. tag::bucket-span[]
  151. The size of the interval that the analysis is aggregated into, typically between
  152. `5m` and `1h`. The default value is `5m`. For more information about time units,
  153. see <<time-units>>.
  154. end::bucket-span[]
  155. tag::by-field-name[]
  156. The field used to split the data. In particular, this property is used for
  157. analyzing the splits with respect to their own history. It is used for finding
  158. unusual values in the context of the split.
  159. end::by-field-name[]
  160. tag::categorization-analyzer[]
  161. If `categorization_field_name` is specified, you can also define the analyzer
  162. that is used to interpret the categorization field. This property cannot be used
  163. at the same time as `categorization_filters`. The categorization analyzer
  164. specifies how the `categorization_field` is interpreted by the categorization
  165. process. The syntax is very similar to that used to define the `analyzer` in the
  166. <<indices-analyze,Analyze endpoint>>. For more information, see
  167. {stack-ov}/ml-configuring-categories.html[Categorizing log messages].
  168. +
  169. --
  170. The `categorization_analyzer` field can be specified either as a string or as an
  171. object. If it is a string it must refer to a
  172. <<analysis-analyzers,built-in analyzer>> or one added by another plugin. If it
  173. is an object it has the following properties:
  174. --
  175. `char_filter`::::
  176. (array of strings or objects)
  177. include::{docdir}/ml/ml-shared.asciidoc[tag=char-filter]
  178. `tokenizer`::::
  179. (string or object)
  180. include::{docdir}/ml/ml-shared.asciidoc[tag=tokenizer]
  181. `filter`::::
  182. (array of strings or objects)
  183. include::{docdir}/ml/ml-shared.asciidoc[tag=filter]
  184. end::categorization-analyzer[]
  185. tag::categorization-examples-limit[]
  186. The maximum number of examples stored per category in memory and in the results
  187. data store. The default value is 4. If you increase this value, more examples
  188. are available, however it requires that you have more storage available. If you
  189. set this value to `0`, no examples are stored.
  190. +
  191. --
  192. NOTE: The `categorization_examples_limit` only applies to analysis that uses
  193. categorization. For more information, see
  194. {stack-ov}/ml-configuring-categories.html[Categorizing log messages].
  195. --
  196. end::categorization-examples-limit[]
  197. tag::categorization-field-name[]
  198. If this property is specified, the values of the specified field will be
  199. categorized. The resulting categories must be used in a detector by setting
  200. `by_field_name`, `over_field_name`, or `partition_field_name` to the keyword
  201. `mlcategory`. For more information, see
  202. {stack-ov}/ml-configuring-categories.html[Categorizing log messages].
  203. end::categorization-field-name[]
  204. tag::categorization-filters[]
  205. If `categorization_field_name` is specified, you can also define optional
  206. filters. This property expects an array of regular expressions. The expressions
  207. are used to filter out matching sequences from the categorization field values.
  208. You can use this functionality to fine tune the categorization by excluding
  209. sequences from consideration when categories are defined. For example, you can
  210. exclude SQL statements that appear in your log files. For more information, see
  211. {stack-ov}/ml-configuring-categories.html[Categorizing log messages]. This
  212. property cannot be used at the same time as `categorization_analyzer`. If you
  213. only want to define simple regular expression filters that are applied prior to
  214. tokenization, setting this property is the easiest method. If you also want to
  215. customize the tokenizer or post-tokenization filtering, use the
  216. `categorization_analyzer` property instead and include the filters as
  217. `pattern_replace` character filters. The effect is exactly the same.
  218. end::categorization-filters[]
  219. tag::char-filter[]
  220. One or more <<analysis-charfilters,character filters>>. In addition to the
  221. built-in character filters, other plugins can provide more character filters.
  222. This property is optional. If it is not specified, no character filters are
  223. applied prior to categorization. If you are customizing some other aspect of the
  224. analyzer and you need to achieve the equivalent of `categorization_filters`
  225. (which are not permitted when some other aspect of the analyzer is customized),
  226. add them here as
  227. <<analysis-pattern-replace-charfilter,pattern replace character filters>>.
  228. end::char-filter[]
  229. tag::compute-feature-influence[]
  230. If `true`, the feature influence calculation is enabled. Defaults to `true`.
  231. end::compute-feature-influence[]
  232. tag::chunking-config[]
  233. {dfeeds-cap} might be required to search over long time periods, for several months
  234. or years. This search is split into time chunks in order to ensure the load
  235. on {es} is managed. Chunking configuration controls how the size of these time
  236. chunks are calculated and is an advanced configuration option.
  237. A chunking configuration object has the following properties:
  238. `mode`:::
  239. (string)
  240. include::{docdir}/ml/ml-shared.asciidoc[tag=mode]
  241. `time_span`:::
  242. (<<time-units,time units>>)
  243. include::{docdir}/ml/ml-shared.asciidoc[tag=time-span]
  244. end::chunking-config[]
  245. tag::custom-rules[]
  246. An array of custom rule objects, which enable you to customize the way detectors
  247. operate. For example, a rule may dictate to the detector conditions under which
  248. results should be skipped. For more examples, see
  249. {stack-ov}/ml-configuring-detector-custom-rules.html[Configuring detector custom rules].
  250. A custom rule has the following properties:
  251. +
  252. --
  253. `actions`::
  254. (array) The set of actions to be triggered when the rule applies. If
  255. more than one action is specified the effects of all actions are combined. The
  256. available actions include:
  257. * `skip_result`: The result will not be created. This is the default value.
  258. Unless you also specify `skip_model_update`, the model will be updated as usual
  259. with the corresponding series value.
  260. * `skip_model_update`: The value for that series will not be used to update the
  261. model. Unless you also specify `skip_result`, the results will be created as
  262. usual. This action is suitable when certain values are expected to be
  263. consistently anomalous and they affect the model in a way that negatively
  264. impacts the rest of the results.
  265. `scope`::
  266. (object) An optional scope of series where the rule applies. A rule must either
  267. have a non-empty scope or at least one condition. By default, the scope includes
  268. all series. Scoping is allowed for any of the fields that are also specified in
  269. `by_field_name`, `over_field_name`, or `partition_field_name`. To add a scope
  270. for a field, add the field name as a key in the scope object and set its value
  271. to an object with the following properties:
  272. `filter_id`:::
  273. (string) The id of the filter to be used.
  274. `filter_type`:::
  275. (string) Either `include` (the rule applies for values in the filter) or
  276. `exclude` (the rule applies for values not in the filter). Defaults to
  277. `include`.
  278. `conditions`::
  279. (array) An optional array of numeric conditions when the rule applies. A rule
  280. must either have a non-empty scope or at least one condition. Multiple
  281. conditions are combined together with a logical `AND`. A condition has the
  282. following properties:
  283. `applies_to`:::
  284. (string) Specifies the result property to which the condition applies. The
  285. available options are `actual`, `typical`, `diff_from_typical`, `time`.
  286. `operator`:::
  287. (string) Specifies the condition operator. The available options are `gt`
  288. (greater than), `gte` (greater than or equals), `lt` (less than) and `lte` (less
  289. than or equals).
  290. `value`:::
  291. (double) The value that is compared against the `applies_to` field using the
  292. `operator`.
  293. --
  294. +
  295. --
  296. NOTE: If your detector uses `lat_long`, `metric`, `rare`, or `freq_rare`
  297. functions, you can only specify `conditions` that apply to `time`.
  298. --
  299. end::custom-rules[]
  300. tag::custom-settings[]
  301. Advanced configuration option. Contains custom meta data about the job. For
  302. example, it can contain custom URL information as shown in
  303. {stack-ov}/ml-configuring-url.html[Adding custom URLs to {ml} results].
  304. end::custom-settings[]
  305. tag::data-description[]
  306. The data description defines the format of the input data when you send data to
  307. the job by using the <<ml-post-data,post data>> API. Note that when configure
  308. a {dfeed}, these properties are automatically set.
  309. +
  310. --
  311. When data is received via the <<ml-post-data,post data>> API, it is not stored
  312. in {es}. Only the results for {anomaly-detect} are retained.
  313. A data description object has the following properties:
  314. `format`:::
  315. (string) Only `JSON` format is supported at this time.
  316. `time_field`:::
  317. (string) The name of the field that contains the timestamp.
  318. The default value is `time`.
  319. `time_format`:::
  320. (string)
  321. include::{docdir}/ml/ml-shared.asciidoc[tag=time-format]
  322. --
  323. end::data-description[]
  324. tag::data-frame-analytics[]
  325. An array of {dfanalytics-job} resources, which are sorted by the `id` value in
  326. ascending order.
  327. `id`:::
  328. (string) The unique identifier of the {dfanalytics-job}.
  329. `source`:::
  330. (object) The configuration of how the analysis data is sourced. It has an
  331. `index` parameter and optionally a `query` and a `_source`.
  332. `index`::::
  333. (array) Index or indices on which to perform the analysis. It can be a single
  334. index or index pattern as well as an array of indices or patterns.
  335. `query`::::
  336. (object) The query that has been specified for the {dfanalytics-job}. The {es}
  337. query domain-specific language (<<query-dsl,DSL>>). This value corresponds to
  338. the query object in an {es} search POST body. By default, this property has the
  339. following value: `{"match_all": {}}`.
  340. `_source`::::
  341. (object) Contains the specified `includes` and/or `excludes` patterns that
  342. select which fields are present in the destination. Fields that are excluded
  343. cannot be included in the analysis.
  344. `includes`:::::
  345. (array) An array of strings that defines the fields that are included in the
  346. destination.
  347. `excludes`:::::
  348. (array) An array of strings that defines the fields that are excluded from the
  349. destination.
  350. `dest`:::
  351. (string) The destination configuration of the analysis.
  352. `index`::::
  353. (string) The _destination index_ that stores the results of the
  354. {dfanalytics-job}.
  355. `results_field`::::
  356. (string) The name of the field that stores the results of the analysis. Defaults
  357. to `ml`.
  358. `analysis`:::
  359. (object) The type of analysis that is performed on the `source`.
  360. `analyzed_fields`:::
  361. (object) Contains `includes` and/or `excludes` patterns that select which fields
  362. are included in the analysis.
  363. `includes`::::
  364. (Optional, array) An array of strings that defines the fields that are included
  365. in the analysis.
  366. `excludes`::::
  367. (Optional, array) An array of strings that defines the fields that are excluded
  368. from the analysis.
  369. `model_memory_limit`:::
  370. (string) The `model_memory_limit` that has been set to the {dfanalytics-job}.
  371. end::data-frame-analytics[]
  372. tag::data-frame-analytics-stats[]
  373. An array of statistics objects for {dfanalytics-jobs}, which are
  374. sorted by the `id` value in ascending order.
  375. `id`:::
  376. (string) The unique identifier of the {dfanalytics-job}.
  377. `state`:::
  378. (string) Current state of the {dfanalytics-job}.
  379. `progress`:::
  380. (array) The progress report of the {dfanalytics-job} by phase.
  381. `phase`:::
  382. (string) Defines the phase of the {dfanalytics-job}. Possible phases:
  383. `reindexing`, `loading_data`, `analyzing`, and `writing_results`.
  384. `progress_percent`:::
  385. (integer) The progress that the {dfanalytics-job} has made expressed in
  386. percentage.
  387. end::data-frame-analytics-stats[]
  388. tag::datafeed-id[]
  389. A numerical character string that uniquely identifies the
  390. {dfeed}. This identifier can contain lowercase alphanumeric characters (a-z
  391. and 0-9), hyphens, and underscores. It must start and end with alphanumeric
  392. characters.
  393. end::datafeed-id[]
  394. tag::datafeed-id-wildcard[]
  395. Identifier for the {dfeed}. It can be a {dfeed} identifier or a wildcard
  396. expression.
  397. end::datafeed-id-wildcard[]
  398. tag::delayed-data-check-config[]
  399. Specifies whether the {dfeed} checks for missing data and the size of the
  400. window. For example: `{"enabled": true, "check_window": "1h"}`.
  401. +
  402. --
  403. The {dfeed} can optionally search over indices that have already been read in
  404. an effort to determine whether any data has subsequently been added to the index.
  405. If missing data is found, it is a good indication that the `query_delay` option
  406. is set too low and the data is being indexed after the {dfeed} has passed that
  407. moment in time. See
  408. {stack-ov}/ml-delayed-data-detection.html[Working with delayed data].
  409. This check runs only on real-time {dfeeds}.
  410. The configuration object has the following properties:
  411. `enabled`::
  412. (boolean) Specifies whether the {dfeed} periodically checks for delayed data.
  413. Defaults to `true`.
  414. `check_window`::
  415. (<<time-units,time units>>) The window of time that is searched for late data.
  416. This window of time ends with the latest finalized bucket. It defaults to
  417. `null`, which causes an appropriate `check_window` to be calculated when the
  418. real-time {dfeed} runs. In particular, the default `check_window` span
  419. calculation is based on the maximum of `2h` or `8 * bucket_span`.
  420. --
  421. end::delayed-data-check-config[]
  422. tag::dependent-variable[]
  423. Defines which field of the document is to be predicted.
  424. This parameter is supplied by field name and must match one of the fields in
  425. the index being used to train. If this field is missing from a document, then
  426. that document will not be used for training, but a prediction with the trained
  427. model will be generated for it. It is also known as continuous target variable.
  428. end::dependent-variable[]
  429. tag::description-dfa[]
  430. A description of the job.
  431. end::description-dfa[]
  432. tag::dest[]
  433. The destination configuration, consisting of `index` and
  434. optionally `results_field` (`ml` by default).
  435. `index`:::
  436. (Required, string) Defines the _destination index_ to store the results of
  437. the {dfanalytics-job}.
  438. `results_field`:::
  439. (Optional, string) Defines the name of the field in which to store the
  440. results of the analysis. Default to `ml`.
  441. end::dest[]
  442. tag::detector-description[]
  443. A description of the detector. For example, `Low event rate`.
  444. end::detector-description[]
  445. tag::detector-field-name[]
  446. The field that the detector uses in the function. If you use an event rate
  447. function such as `count` or `rare`, do not specify this field.
  448. +
  449. --
  450. NOTE: The `field_name` cannot contain double quotes or backslashes.
  451. --
  452. end::detector-field-name[]
  453. tag::detector-index[]
  454. A unique identifier for the detector. This identifier is based on the order of
  455. the detectors in the `analysis_config`, starting at zero. You can use this
  456. identifier when you want to update a specific detector.
  457. end::detector-index[]
  458. tag::detector[]
  459. A detector has the following properties:
  460. `by_field_name`::::
  461. (string)
  462. include::{docdir}/ml/ml-shared.asciidoc[tag=by-field-name]
  463. `custom_rules`::::
  464. (array)
  465. include::{docdir}/ml/ml-shared.asciidoc[tag=custom-rules]
  466. `detector_description`::::
  467. (string)
  468. include::{docdir}/ml/ml-shared.asciidoc[tag=detector-description]
  469. `detector_index`::::
  470. (integer)
  471. include::{docdir}/ml/ml-shared.asciidoc[tag=detector-index]
  472. `exclude_frequent`::::
  473. (string)
  474. include::{docdir}/ml/ml-shared.asciidoc[tag=exclude-frequent]
  475. `field_name`::::
  476. (string)
  477. include::{docdir}/ml/ml-shared.asciidoc[tag=detector-field-name]
  478. `function`::::
  479. (string)
  480. include::{docdir}/ml/ml-shared.asciidoc[tag=function]
  481. `over_field_name`::::
  482. (string)
  483. include::{docdir}/ml/ml-shared.asciidoc[tag=over-field-name]
  484. `partition_field_name`::::
  485. (string)
  486. include::{docdir}/ml/ml-shared.asciidoc[tag=partition-field-name]
  487. `use_null`::::
  488. (boolean)
  489. include::{docdir}/ml/ml-shared.asciidoc[tag=use-null]
  490. end::detector[]
  491. tag::eta[]
  492. The shrinkage applied to the weights. Smaller values result
  493. in larger forests which have better generalization error. However, the smaller
  494. the value the longer the training will take. For more information, see
  495. https://en.wikipedia.org/wiki/Gradient_boosting#Shrinkage[this wiki article]
  496. about shrinkage.
  497. end::eta[]
  498. tag::exclude-frequent[]
  499. Contains one of the following values: `all`, `none`, `by`, or `over`. If set,
  500. frequent entities are excluded from influencing the anomaly results. Entities
  501. can be considered frequent over time or frequent in a population. If you are
  502. working with both over and by fields, then you can set `exclude_frequent` to
  503. `all` for both fields, or to `by` or `over` for those specific fields.
  504. end::exclude-frequent[]
  505. tag::feature-bag-fraction[]
  506. Defines the fraction of features that will be used when
  507. selecting a random bag for each candidate split.
  508. end::feature-bag-fraction[]
  509. tag::feature-influence-threshold[]
  510. The minimum {olscore} that a document needs to have in order to calculate its
  511. {fiscore}. Value range: 0-1 (`0.1` by default).
  512. end::feature-influence-threshold[]
  513. tag::field-selection[]
  514. An array of objects that explain selection for each field, sorted by
  515. the field names. Each object in the array has the following properties:
  516. `name`:::
  517. (string) The field name.
  518. `mapping_types`:::
  519. (string) The mapping types of the field.
  520. `is_included`:::
  521. (boolean) Whether the field is selected to be included in the analysis.
  522. `is_required`:::
  523. (boolean) Whether the field is required.
  524. `feature_type`:::
  525. (string) The feature type of this field for the analysis. May be `categorical`
  526. or `numerical`.
  527. `reason`:::
  528. (string) The reason a field is not selected to be included in the analysis.
  529. end::field-selection[]
  530. tag::filter[]
  531. One or more <<analysis-tokenfilters,token filters>>. In addition to the built-in
  532. token filters, other plugins can provide more token filters. This property is
  533. optional. If it is not specified, no token filters are applied prior to
  534. categorization.
  535. end::filter[]
  536. tag::frequency[]
  537. The interval at which scheduled queries are made while the {dfeed} runs in real
  538. time. The default value is either the bucket span for short bucket spans, or,
  539. for longer bucket spans, a sensible fraction of the bucket span. For example:
  540. `150s`.
  541. end::frequency[]
  542. tag::from[]
  543. Skips the specified number of {dfanalytics-jobs}. The default value is `0`.
  544. end::from[]
  545. tag::function[]
  546. The analysis function that is used. For example, `count`, `rare`, `mean`, `min`,
  547. `max`, and `sum`. For more information, see
  548. {stack-ov}/ml-functions.html[Function reference].
  549. end::function[]
  550. tag::gamma[]
  551. Regularization parameter to prevent overfitting on the
  552. training dataset. Multiplies a linear penalty associated with the size of
  553. individual trees in the forest. The higher the value the more training will
  554. prefer smaller trees. The smaller this parameter the larger individual trees
  555. will be and the longer train will take.
  556. end::gamma[]
  557. tag::groups[]
  558. A list of job groups. A job can belong to no groups or many.
  559. end::groups[]
  560. tag::indices[]
  561. An array of index names. Wildcards are supported. For example:
  562. `["it_ops_metrics", "server*"]`.
  563. +
  564. --
  565. NOTE: If any indices are in remote clusters then `cluster.remote.connect` must
  566. not be set to `false` on any {ml} nodes.
  567. --
  568. end::indices[]
  569. tag::influencers[]
  570. A comma separated list of influencer field names. Typically these can be the by,
  571. over, or partition fields that are used in the detector configuration. You might
  572. also want to use a field name that is not specifically named in a detector, but
  573. is available as part of the input data. When you use multiple detectors, the use
  574. of influencers is recommended as it aggregates results for each influencer entity.
  575. end::influencers[]
  576. tag::job-id-anomaly-detection[]
  577. Identifier for the {anomaly-job}.
  578. end::job-id-anomaly-detection[]
  579. tag::job-id-data-frame-analytics[]
  580. Identifier for the {dfanalytics-job}.
  581. end::job-id-data-frame-analytics[]
  582. tag::job-id-anomaly-detection-default[]
  583. Identifier for the {anomaly-job}. It can be a job identifier, a group name, or a
  584. wildcard expression. If you do not specify one of these options, the API returns
  585. information for all {anomaly-jobs}.
  586. end::job-id-anomaly-detection-default[]
  587. tag::job-id-data-frame-analytics-default[]
  588. Identifier for the {dfanalytics-job}. If you do not specify this option, the API
  589. returns information for the first hundred {dfanalytics-jobs}.
  590. end::job-id-data-frame-analytics-default[]
  591. tag::job-id-anomaly-detection-list[]
  592. An identifier for the {anomaly-jobs}. It can be a job
  593. identifier, a group name, or a comma-separated list of jobs or groups.
  594. end::job-id-anomaly-detection-list[]
  595. tag::job-id-anomaly-detection-wildcard[]
  596. Identifier for the {anomaly-job}. It can be a job identifier, a group name, or a
  597. wildcard expression.
  598. end::job-id-anomaly-detection-wildcard[]
  599. tag::job-id-anomaly-detection-wildcard-list[]
  600. Identifier for the {anomaly-job}. It can be a job identifier, a group name, a
  601. comma-separated list of jobs or groups, or a wildcard expression.
  602. end::job-id-anomaly-detection-wildcard-list[]
  603. tag::job-id-anomaly-detection-define[]
  604. Identifier for the {anomaly-job}. This identifier can contain lowercase
  605. alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start
  606. and end with alphanumeric characters.
  607. end::job-id-anomaly-detection-define[]
  608. tag::job-id-data-frame-analytics-define[]
  609. Identifier for the {dfanalytics-job}. This identifier can contain lowercase
  610. alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start
  611. and end with alphanumeric characters.
  612. end::job-id-data-frame-analytics-define[]
  613. tag::job-id-datafeed[]
  614. The unique identifier for the job to which the {dfeed} sends data.
  615. end::job-id-datafeed[]
  616. tag::lambda[]
  617. Regularization parameter to prevent overfitting on the
  618. training dataset. Multiplies an L2 regularisation term which applies to leaf
  619. weights of the individual trees in the forest. The higher the value the more
  620. training will attempt to keep leaf weights small. This makes the prediction
  621. function smoother at the expense of potentially not being able to capture
  622. relevant relationships between the features and the {depvar}. The smaller this
  623. parameter the larger individual trees will be and the longer train will take.
  624. end::lambda[]
  625. tag::latency[]
  626. The size of the window in which to expect data that is out of time order. The
  627. default value is 0 (no latency). If you specify a non-zero value, it must be
  628. greater than or equal to one second. For more information about time units, see
  629. <<time-units>>.
  630. +
  631. --
  632. NOTE: Latency is only applicable when you send data by using
  633. the <<ml-post-data,post data>> API.
  634. --
  635. end::latency[]
  636. tag::max-empty-searches[]
  637. If a real-time {dfeed} has never seen any data (including during any initial
  638. training period) then it will automatically stop itself and close its associated
  639. job after this many real-time searches that return no documents. In other words,
  640. it will stop after `frequency` times `max_empty_searches` of real-time operation.
  641. If not set then a {dfeed} with no end time that sees no data will remain started
  642. until it is explicitly stopped. By default this setting is not set.
  643. end::max-empty-searches[]
  644. tag::maximum-number-trees[]
  645. Defines the maximum number of trees the forest is allowed
  646. to contain. The maximum value is 2000.
  647. end::maximum-number-trees[]
  648. tag::memory-estimation[]
  649. An object containing the memory estimates. The object has the
  650. following properties:
  651. `expected_memory_without_disk`:::
  652. (string) Estimated memory usage under the assumption that the whole
  653. {dfanalytics} should happen in memory (i.e. without overflowing to disk).
  654. `expected_memory_with_disk`:::
  655. (string) Estimated memory usage under the assumption that overflowing to disk is
  656. allowed during {dfanalytics}. `expected_memory_with_disk` is usually smaller
  657. than `expected_memory_without_disk` as using disk allows to limit the main
  658. memory needed to perform {dfanalytics}.
  659. end::memory-estimation[]
  660. tag::method[]
  661. Sets the method that {oldetection} uses. If the method is not set {oldetection}
  662. uses an ensemble of different methods and normalises and combines their
  663. individual {olscores} to obtain the overall {olscore}. We recommend to use the
  664. ensemble method. Available methods are `lof`, `ldof`, `distance_kth_nn`,
  665. `distance_knn`.
  666. end::method[]
  667. tag::mode[]
  668. There are three available modes:
  669. +
  670. --
  671. * `auto`: The chunk size is dynamically calculated. This is the default and
  672. recommended value.
  673. * `manual`: Chunking is applied according to the specified `time_span`.
  674. * `off`: No chunking is applied.
  675. --
  676. end::mode[]
  677. tag::model-memory-limit[]
  678. The approximate maximum amount of memory resources that are required for
  679. analytical processing. Once this limit is approached, data pruning becomes
  680. more aggressive. Upon exceeding this limit, new entities are not modeled. The
  681. default value for jobs created in version 6.1 and later is `1024mb`.
  682. This value will need to be increased for jobs that are expected to analyze high
  683. cardinality fields, but the default is set to a relatively small size to ensure
  684. that high resource usage is a conscious decision. The default value for jobs
  685. created in versions earlier than 6.1 is `4096mb`.
  686. +
  687. --
  688. If you specify a number instead of a string, the units are assumed to be MiB.
  689. Specifying a string is recommended for clarity. If you specify a byte size unit
  690. of `b` or `kb` and the number does not equate to a discrete number of megabytes,
  691. it is rounded down to the closest MiB. The minimum valid value is 1 MiB. If you
  692. specify a value less than 1 MiB, an error occurs. For more information about
  693. supported byte size units, see <<byte-units>>.
  694. If your `elasticsearch.yml` file contains an `xpack.ml.max_model_memory_limit`
  695. setting, an error occurs when you try to create jobs that have
  696. `model_memory_limit` values greater than that setting. For more information,
  697. see <<ml-settings>>.
  698. --
  699. end::model-memory-limit[]
  700. tag::model-memory-limit-dfa[]
  701. The approximate maximum amount of memory resources that are permitted for
  702. analytical processing. The default value for {dfanalytics-jobs} is `1gb`. If
  703. your `elasticsearch.yml` file contains an `xpack.ml.max_model_memory_limit`
  704. setting, an error occurs when you try to create {dfanalytics-jobs} that have
  705. `model_memory_limit` values greater than that setting. For more information, see
  706. <<ml-settings>>.
  707. end::model-memory-limit-dfa[]
  708. tag::model-plot-config[]
  709. This advanced configuration option stores model information along with the
  710. results. It provides a more detailed view into {anomaly-detect}.
  711. +
  712. --
  713. WARNING: If you enable model plot it can add considerable overhead to the
  714. performance of the system; it is not feasible for jobs with many entities.
  715. Model plot provides a simplified and indicative view of the model and its
  716. bounds. It does not display complex features such as multivariate correlations
  717. or multimodal data. As such, anomalies may occasionally be reported which cannot
  718. be seen in the model plot.
  719. Model plot config can be configured when the job is created or updated later. It
  720. must be disabled if performance issues are experienced.
  721. The `model_plot_config` object has the following properties:
  722. `enabled`:::
  723. (boolean) If true, enables calculation and storage of the model bounds for
  724. each entity that is being analyzed. By default, this is not enabled.
  725. `terms`:::
  726. experimental[] (string) Limits data collection to this comma separated list of
  727. partition or by field values. If terms are not specified or it is an empty
  728. string, no filtering is applied. For example, "CPU,NetworkIn,DiskWrites".
  729. Wildcards are not supported. Only the specified `terms` can be viewed when
  730. using the Single Metric Viewer.
  731. --
  732. end::model-plot-config[]
  733. tag::model-snapshot-id[]
  734. A numerical character string that uniquely identifies the model snapshot. For
  735. example, `1491007364`. For more information about model snapshots, see
  736. <<ml-snapshot-resource>>.
  737. end::model-snapshot-id[]
  738. tag::model-snapshot-retention-days[]
  739. The time in days that model snapshots are retained for the job. Older snapshots
  740. are deleted. The default value is `1`, which means snapshots are retained for
  741. one day (twenty-four hours).
  742. end::model-snapshot-retention-days[]
  743. tag::multivariate-by-fields[]
  744. This functionality is reserved for internal use. It is not supported for use in
  745. customer environments and is not subject to the support SLA of official GA
  746. features.
  747. +
  748. --
  749. If set to `true`, the analysis will automatically find correlations between
  750. metrics for a given `by` field value and report anomalies when those
  751. correlations cease to hold. For example, suppose CPU and memory usage on host A
  752. is usually highly correlated with the same metrics on host B. Perhaps this
  753. correlation occurs because they are running a load-balanced application.
  754. If you enable this property, then anomalies will be reported when, for example,
  755. CPU usage on host A is high and the value of CPU usage on host B is low. That
  756. is to say, you'll see an anomaly when the CPU of host A is unusual given
  757. the CPU of host B.
  758. NOTE: To use the `multivariate_by_fields` property, you must also specify
  759. `by_field_name` in your detector.
  760. --
  761. end::multivariate-by-fields[]
  762. tag::n-neighbors[]
  763. Defines the value for how many nearest neighbors each method of
  764. {oldetection} will use to calculate its {olscore}. When the value is not set,
  765. different values will be used for different ensemble members. This helps
  766. improve diversity in the ensemble. Therefore, only override this if you are
  767. confident that the value you choose is appropriate for the data set.
  768. end::n-neighbors[]
  769. tag::num-top-classes[]
  770. Defines the number of categories for which the predicted
  771. probabilities are reported. It must be non-negative. If it is greater than the
  772. total number of categories (in the {version} version of the {stack}, it's two)
  773. to predict then we will report all category probabilities. Defaults to 2.
  774. end::num-top-classes[]
  775. tag::over-field-name[]
  776. The field used to split the data. In particular, this property is used for
  777. analyzing the splits with respect to the history of all splits. It is used for
  778. finding unusual values in the population of all splits. For more information,
  779. see {stack-ov}/ml-configuring-pop.html[Performing population analysis].
  780. end::over-field-name[]
  781. tag::outlier-fraction[]
  782. Sets the proportion of the data set that is assumed to be outlying prior to
  783. {oldetection}. For example, 0.05 means it is assumed that 5% of values are real
  784. outliers and 95% are inliers.
  785. end::outlier-fraction[]
  786. tag::partition-field-name[]
  787. The field used to segment the analysis. When you use this property, you have
  788. completely independent baselines for each value of this field.
  789. end::partition-field-name[]
  790. tag::prediction-field-name[]
  791. Defines the name of the prediction field in the results.
  792. Defaults to `<dependent_variable>_prediction`.
  793. end::prediction-field-name[]
  794. tag::randomize-seed[]
  795. Defines the seed to the random generator that is used to pick which documents
  796. will be used for training. By default it is randomly generated. Set it to a
  797. specific value to ensure the same documents are used for training assuming other
  798. related parameters (for example, `source`, `analyzed_fields`, etc.) are the
  799. same.
  800. end::randomize-seed[]
  801. tag::query[]
  802. The {es} query domain-specific language (DSL). This value corresponds to the
  803. query object in an {es} search POST body. All the options that are supported by
  804. {es} can be used, as this object is passed verbatim to {es}. By default, this
  805. property has the following value: `{"match_all": {"boost": 1}}`.
  806. end::query[]
  807. tag::query-delay[]
  808. The number of seconds behind real time that data is queried. For example, if
  809. data from 10:04 a.m. might not be searchable in {es} until 10:06 a.m., set this
  810. property to 120 seconds. The default value is randomly selected between `60s`
  811. and `120s`. This randomness improves the query performance when there are
  812. multiple jobs running on the same node.
  813. end::query-delay[]
  814. tag::renormalization-window-days[]
  815. Advanced configuration option. The period over which adjustments to the score
  816. are applied, as new data is seen. The default value is the longer of 30 days or
  817. 100 `bucket_spans`.
  818. end::renormalization-window-days[]
  819. tag::results-index-name[]
  820. A text string that affects the name of the {ml} results index. The default value
  821. is `shared`, which generates an index named `.ml-anomalies-shared`.
  822. end::results-index-name[]
  823. tag::results-retention-days[]
  824. Advanced configuration option. The number of days for which job results are
  825. retained. Once per day at 00:30 (server time), results older than this period
  826. are deleted from {es}. The default value is null, which means results are
  827. retained.
  828. end::results-retention-days[]
  829. tag::script-fields[]
  830. Specifies scripts that evaluate custom expressions and returns script fields to
  831. the {dfeed}. The detector configuration objects in a job can contain functions
  832. that use these script fields. For more information, see
  833. {stack-ov}/ml-configuring-transform.html[Transforming data with script fields]
  834. and <<request-body-search-script-fields,Script fields>>.
  835. end::script-fields[]
  836. tag::scroll-size[]
  837. The `size` parameter that is used in {es} searches. The default value is `1000`.
  838. end::scroll-size[]
  839. tag::size[]
  840. Specifies the maximum number of {dfanalytics-jobs} to obtain. The default value
  841. is `100`.
  842. end::size[]
  843. tag::source-put-dfa[]
  844. The configuration of how to source the analysis data. It requires an
  845. `index`. Optionally, `query` and `_source` may be specified.
  846. `index`:::
  847. (Required, string or array) Index or indices on which to perform the
  848. analysis. It can be a single index or index pattern as well as an array of
  849. indices or patterns.
  850. `query`:::
  851. (Optional, object) The {es} query domain-specific language
  852. (<<query-dsl,DSL>>). This value corresponds to the query object in an {es}
  853. search POST body. All the options that are supported by {es} can be used,
  854. as this object is passed verbatim to {es}. By default, this property has
  855. the following value: `{"match_all": {}}`.
  856. `_source`:::
  857. (Optional, object) Specify `includes` and/or `excludes` patterns to select
  858. which fields will be present in the destination. Fields that are excluded
  859. cannot be included in the analysis.
  860. `includes`::::
  861. (array) An array of strings that defines the fields that will be
  862. included in the destination.
  863. `excludes`::::
  864. (array) An array of strings that defines the fields that will be
  865. excluded from the destination.
  866. end::source-put-dfa[]
  867. tag::standardization-enabled[]
  868. If `true`, then the following operation is performed on the columns before
  869. computing outlier scores: (x_i - mean(x_i)) / sd(x_i). Defaults to `true`. For
  870. more information, see
  871. https://en.wikipedia.org/wiki/Feature_scaling#Standardization_(Z-score_Normalization)[this wiki page about standardization].
  872. end::standardization-enabled[]
  873. tag::summary-count-field-name[]
  874. If this property is specified, the data that is fed to the job is expected to be
  875. pre-summarized. This property value is the name of the field that contains the
  876. count of raw data points that have been summarized. The same
  877. `summary_count_field_name` applies to all detectors in the job.
  878. +
  879. --
  880. NOTE: The `summary_count_field_name` property cannot be used with the `metric`
  881. function.
  882. --
  883. end::summary-count-field-name[]
  884. tag::timeout-start[]
  885. Controls the amount of time to wait until the {dfanalytics-job} starts. Defaults
  886. to 20 seconds.
  887. end::timeout-start[]
  888. tag::timeout-stop[]
  889. Controls the amount of time to wait until the {dfanalytics-job} stops. Defaults
  890. to 20 seconds.
  891. end::timeout-stop[]
  892. tag::time-format[]
  893. The time format, which can be `epoch`, `epoch_ms`, or a custom pattern. The
  894. default value is `epoch`, which refers to UNIX or Epoch time (the number of
  895. seconds since 1 Jan 1970). The value `epoch_ms` indicates that time is measured
  896. in milliseconds since the epoch. The `epoch` and `epoch_ms` time formats accept
  897. either integer or real values. +
  898. +
  899. --
  900. NOTE: Custom patterns must conform to the Java `DateTimeFormatter` class.
  901. When you use date-time formatting patterns, it is recommended that you provide
  902. the full date, time and time zone. For example: `yyyy-MM-dd'T'HH:mm:ssX`.
  903. If the pattern that you specify is not sufficient to produce a complete
  904. timestamp, job creation fails.
  905. --
  906. end::time-format[]
  907. tag::time-span[]
  908. The time span that each search will be querying. This setting is only applicable
  909. when the mode is set to `manual`. For example: `3h`.
  910. end::time-span[]
  911. tag::tokenizer[]
  912. The name or definition of the <<analysis-tokenizers,tokenizer>> to use after
  913. character filters are applied. This property is compulsory if
  914. `categorization_analyzer` is specified as an object. Machine learning provides a
  915. tokenizer called `ml_classic` that tokenizes in the same way as the
  916. non-customizable tokenizer in older versions of the product. If you want to use
  917. that tokenizer but change the character or token filters, specify
  918. `"tokenizer": "ml_classic"` in your `categorization_analyzer`.
  919. end::tokenizer[]
  920. tag::training-percent[]
  921. Defines what percentage of the eligible documents that will
  922. be used for training. Documents that are ignored by the analysis (for example
  923. those that contain arrays) won’t be included in the calculation for used
  924. percentage. Defaults to `100`.
  925. end::training-percent[]
  926. tag::use-null[]
  927. Defines whether a new series is used as the null series when there is no value
  928. for the by or partition fields. The default value is `false`.
  929. end::use-null[]