ml-shared.asciidoc 43 KB

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