ml-shared.asciidoc 33 KB

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