[DOCS] Move ML APIs up a level in TOC (elastic/x-pack-elasticsearch#1644)

Original commit: elastic/x-pack-elasticsearch@6048721806
This commit is contained in:
Lisa Cawley 2017-06-06 13:42:47 -07:00 committed by GitHub
parent 55a8bc87e4
commit 63138f02c5
35 changed files with 266 additions and 266 deletions

View File

@ -0,0 +1,18 @@
[[ml-api-definitions]]
== Definitions
These resource definitions are used in {ml} APIs and in {kib} advanced
job configuration options.
* <<ml-datafeed-resource,{dfeeds-cap}>>
* <<ml-datafeed-counts,{dfeed-cap} counts>>
* <<ml-job-resource,Jobs>>
* <<ml-jobstats,Job statistics>>
* <<ml-snapshot-resource,Model snapshots>>
* <<ml-results-resource,Results>>
include::ml/datafeedresource.asciidoc[]
include::ml/jobresource.asciidoc[]
include::ml/jobcounts.asciidoc[]
include::ml/snapshotresource.asciidoc[]
include::ml/resultsresource.asciidoc[]

View File

@ -10,6 +10,7 @@
* <<watcher-api, Watcher APIs>>
* <<graph-api, Graph APIs>>
* <<ml-apis, Machine Learning APIs>>
* <<ml-api-definitions, Definitions>>
--
[[info-api]]
@ -113,3 +114,4 @@ include::watcher.asciidoc[]
include::graph.asciidoc[]
include::ml-api.asciidoc[]
include::defs.asciidoc[]

View File

@ -1,64 +1,34 @@
[[ml-apis]]
== Machine Learning APIs
Use machine learning to detect anomalies in time series data.
* <<ml-api-datafeed-endpoint,{dfeeds-cap}>>
* <<ml-api-job-endpoint,Jobs>>
* <<ml-api-snapshot-endpoint, Model Snapshots>>
* <<ml-api-result-endpoint,Results>>
* <<ml-api-definitions, Definitions>>
You can use APIs to perform the following {ml} activities:
[float]
[[ml-api-datafeed-endpoint]]
=== {dfeeds-cap}
* <<ml-put-datafeed,Create {dfeed}>>
* <<ml-delete-datafeed,Delete {dfeed}>>
* <<ml-get-datafeed,Get {dfeed} info>>
* <<ml-get-datafeed-stats,Get {dfeed} statistics>>
* <<ml-put-datafeed,Create {dfeed}>>, <<ml-delete-datafeed,Delete {dfeed}>>
* <<ml-start-datafeed,Start {dfeed}>>, <<ml-stop-datafeed,Stop {dfeed}>>
* <<ml-get-datafeed,Get {dfeed} info>>, <<ml-get-datafeed-stats,Get {dfeed} statistics>>
* <<ml-preview-datafeed,Preview {dfeed}>>
* <<ml-start-datafeed,Start {dfeed}>>
* <<ml-stop-datafeed,Stop {dfeed}>>
* <<ml-update-datafeed,Update {dfeed}>>
include::ml/put-datafeed.asciidoc[]
include::ml/delete-datafeed.asciidoc[]
include::ml/get-datafeed.asciidoc[]
include::ml/get-datafeed-stats.asciidoc[]
include::ml/preview-datafeed.asciidoc[]
include::ml/start-datafeed.asciidoc[]
include::ml/stop-datafeed.asciidoc[]
include::ml/update-datafeed.asciidoc[]
[float]
[[ml-api-job-endpoint]]
=== Jobs
You can use APIs to perform the following activities:
* <<ml-close-job,Close job>>
* <<ml-put-job,Create job>>
* <<ml-delete-job,Delete job>>
* <<ml-get-job,Get job info>>
* <<ml-get-job-stats,Get job statistics>>
* <<ml-valid-detector,Validate detectors>>, <<ml-valid-job,Validate job>>
* <<ml-put-job,Create job>>, <<ml-delete-job,Delete job>>
* <<ml-open-job,Open job>>, <<ml-close-job,Close job>>
* <<ml-get-job,Get job info>>, <<ml-get-job-stats,Get job statistics>>
* <<ml-flush-job,Flush job>>
* <<ml-open-job,Open job>>
* <<ml-post-data,Post data to job>>
* <<ml-update-job,Update job>>
* <<ml-valid-detector,Validate detectors>>
* <<ml-valid-job,Validate job>>
include::ml/close-job.asciidoc[]
include::ml/put-job.asciidoc[]
include::ml/delete-job.asciidoc[]
include::ml/get-job.asciidoc[]
include::ml/get-job-stats.asciidoc[]
include::ml/flush-job.asciidoc[]
include::ml/open-job.asciidoc[]
include::ml/post-data.asciidoc[]
include::ml/update-job.asciidoc[]
include::ml/validate-detector.asciidoc[]
include::ml/validate-job.asciidoc[]
[float]
[[ml-api-snapshot-endpoint]]
=== Model Snapshots
@ -67,11 +37,8 @@ include::ml/validate-job.asciidoc[]
* <<ml-revert-snapshot,Revert model snapshot>>
* <<ml-update-snapshot,Update model snapshot>>
include::ml/delete-snapshot.asciidoc[]
include::ml/get-snapshot.asciidoc[]
include::ml/revert-snapshot.asciidoc[]
include::ml/update-snapshot.asciidoc[]
[float]
[[ml-api-result-endpoint]]
=== Results
@ -80,31 +47,43 @@ include::ml/update-snapshot.asciidoc[]
* <<ml-get-influencer,Get influencers>>
* <<ml-get-record,Get records>>
//CLOSE
include::ml/close-job.asciidoc[]
//CREATE
include::ml/put-datafeed.asciidoc[]
include::ml/put-job.asciidoc[]
//DELETE
include::ml/delete-datafeed.asciidoc[]
include::ml/delete-job.asciidoc[]
include::ml/delete-snapshot.asciidoc[]
//FLUSH
include::ml/flush-job.asciidoc[]
//GET
include::ml/get-bucket.asciidoc[]
include::ml/get-category.asciidoc[]
include::ml/get-datafeed.asciidoc[]
include::ml/get-datafeed-stats.asciidoc[]
include::ml/get-influencer.asciidoc[]
include::ml/get-job.asciidoc[]
include::ml/get-job-stats.asciidoc[]
include::ml/get-snapshot.asciidoc[]
include::ml/get-record.asciidoc[]
[[ml-api-definitions]]
=== Definitions
* <<ml-datafeed-resource,{dfeeds-cap}>>
* <<ml-datafeed-counts,{dfeed-cap} counts>>
* <<ml-job-resource,Jobs>>
* <<ml-jobstats,Job statistics>>
* <<ml-snapshot-resource,Model snapshots>>
* <<ml-results-resource,Results>>
include::ml/datafeedresource.asciidoc[]
include::ml/jobresource.asciidoc[]
include::ml/jobcounts.asciidoc[]
include::ml/snapshotresource.asciidoc[]
include::ml/resultsresource.asciidoc[]
//* <<ml-put-job>>
//* <<ml-delete-job>>
//* <<ml-get-job>>
//* <<ml-open-close-job>>
//* <<ml-flush-job>>
//* <<ml-post-data>>
//OPEN
include::ml/open-job.asciidoc[]
//POST
include::ml/post-data.asciidoc[]
//PREVIEW
include::ml/preview-datafeed.asciidoc[]
//REVERT
include::ml/revert-snapshot.asciidoc[]
//START/STOP
include::ml/start-datafeed.asciidoc[]
include::ml/stop-datafeed.asciidoc[]
//UPDATE
include::ml/update-datafeed.asciidoc[]
include::ml/update-job.asciidoc[]
include::ml/update-snapshot.asciidoc[]
//VALIDATE
include::ml/validate-detector.asciidoc[]
include::ml/validate-job.asciidoc[]

View File

@ -1,6 +1,6 @@
//lcawley Verified example output 2017-04-11
[[ml-close-job]]
==== Close Jobs
=== Close Jobs
The close job API enables you to close a job.
A job can be opened and closed multiple times throughout its lifecycle.
@ -9,12 +9,12 @@ A closed job cannot receive data or perform analysis
operations, but you can still explore and navigate results.
===== Request
==== Request
`POST _xpack/ml/anomaly_detectors/<job_id>/_close`
===== Description
==== Description
//A job can be closed once all data has been analyzed.
@ -36,13 +36,13 @@ complete. Therefore, do not use that parameter in a script that expects the job
to be in a consistent state after the close job API returns.
===== Path Parameters
==== Path Parameters
`job_id` (required)::
(string) Identifier for the job
===== Query Parameters
==== Query Parameters
`force`::
(boolean) Use to close a failed job, or to forcefully close a job which has not
@ -53,13 +53,13 @@ to be in a consistent state after the close job API returns.
The default value is 30 minutes.
===== Authorization
==== Authorization
You must have `manage_ml`, or `manage` cluster privileges to use this API.
For more information, see <<privileges-list-cluster>>.
===== Examples
==== Examples
The following example closes the `event_rate` job:

View File

@ -1,6 +1,6 @@
//lcawley Verified example output 2017-04-11
[[ml-datafeed-resource]]
==== {dfeed-cap} Resources
=== {dfeed-cap} Resources
A {dfeed} resource has the following properties:
@ -75,7 +75,7 @@ A {dfeed} resource has the following properties:
For example: `["network","sql","kpi"]`.
[[ml-datafeed-chunking-config]]
===== Chunking Configuration Objects
==== Chunking Configuration Objects
{dfeeds-cap} might be required to search over long time periods, for several months
or years. This search is split into time chunks in order to ensure the load

View File

@ -1,21 +1,21 @@
//lcawley Verified example output 2017-04-11
[[ml-delete-datafeed]]
==== Delete {dfeeds-cap}
=== Delete {dfeeds-cap}
The delete {dfeed} API enables you to delete an existing {dfeed}.
===== Request
==== Request
`DELETE _xpack/ml/datafeeds/<feed_id>`
===== Description
==== Description
NOTE: Unless the `force` parameter is used, the {dfeed} must be stopped before it can be deleted.
===== Path Parameters
==== Path Parameters
`feed_id` (required)::
(string) Identifier for the {dfeed}
@ -27,13 +27,14 @@ NOTE: Unless the `force` parameter is used, the {dfeed} must be stopped before i
(boolean) Use to forcefully delete a started {dfeed}; this method is quicker than
stopping and deleting the {dfeed}.
===== Authorization
You must have `manage_ml`, or `manage` cluster privileges to use this API.
For more information, see <<privileges-list-cluster>>.
===== Examples
==== Examples
The following example deletes the `datafeed-it-ops` {dfeed}:

View File

@ -1,16 +1,16 @@
//lcawley: Verified example output 2017-04-11
[[ml-delete-job]]
==== Delete Jobs
=== Delete Jobs
The delete job API enables you to delete an existing anomaly detection job.
===== Request
==== Request
`DELETE _xpack/ml/anomaly_detectors/<job_id>`
===== Description
==== Description
All job configuration, model state and results are deleted.
@ -26,7 +26,7 @@ is used the job must be closed before it can be deleted.
It is not currently possible to delete multiple jobs using wildcards or a comma
separated list.
===== Path Parameters
==== Path Parameters
`job_id` (required)::
(string) Identifier for the job
@ -38,13 +38,13 @@ separated list.
closing and deleting the job.
===== Authorization
==== Authorization
You must have `manage_ml`, or `manage` cluster privileges to use this API.
For more information, see <<privileges-list-cluster>>.
===== Examples
==== Examples
The following example deletes the `event_rate` job:

View File

@ -1,15 +1,15 @@
[[ml-delete-snapshot]]
==== Delete Model Snapshots
=== Delete Model Snapshots
The delete model snapshot API enables you to delete an existing model snapshot.
===== Request
==== Request
`DELETE _xpack/ml/anomaly_detectors/<job_id>/model_snapshots/<snapshot_id>`
===== Description
==== Description
IMPORTANT: You cannot delete the active model snapshot. To delete that snapshot,
first revert to a different one.
@ -17,7 +17,7 @@ first revert to a different one.
//TBD: Where do you see restorePriority? Per old docs, the active model snapshot
//is "...the snapshot with the highest restorePriority".
===== Path Parameters
==== Path Parameters
`job_id` (required)::
(string) Identifier for the job
@ -26,13 +26,13 @@ first revert to a different one.
(string) Identifier for the model snapshot
===== Authorization
==== Authorization
You must have `manage_ml`, or `manage` cluster privileges to use this API.
For more information, see <<privileges-list-cluster>>.
===== Examples
==== Examples
The following example deletes the `1491948163` snapshot:

View File

@ -1,16 +1,16 @@
//lcawley: Verified example output 2017-04-11
[[ml-flush-job]]
==== Flush Jobs
=== Flush Jobs
The flush job API forces any buffered data to be processed by the job.
===== Request
==== Request
`POST _xpack/ml/anomaly_detectors/<job_id>/_flush`
===== Description
==== Description
The flush job API is only applicable when sending data for analysis using the
<<ml-post-data,post data API>>. Depending on the content of the buffer, then it
@ -23,13 +23,13 @@ additionally prunes and persists the model state to disk and the job must be
opened again before analyzing further data.
===== Path Parameters
==== Path Parameters
`job_id` (required)::
(string) Identifier for the job
===== Query Parameters
==== Query Parameters
`advance_time`::
(string) Specifies that no data prior to the date `advance_time` is expected.
@ -47,13 +47,13 @@ opened again before analyzing further data.
buckets on which to calculate interim results.
===== Authorization
==== Authorization
You must have `manage_ml`, or `manage` cluster privileges to use this API.
For more information, see <<privileges-list-cluster>>.
===== Examples
==== Examples
The following example flushes the `farequote` job:

View File

@ -1,23 +1,23 @@
//lcawley Verified example output 2017-04-11
[[ml-get-bucket]]
==== Get Buckets
=== Get Buckets
The get bucket API enables you to retrieve job results for one or more buckets.
===== Request
==== Request
`GET _xpack/ml/anomaly_detectors/<job_id>/results/buckets` +
`GET _xpack/ml/anomaly_detectors/<job_id>/results/buckets/<timestamp>`
===== Description
==== Description
This API presents a chronological view of the records, grouped by bucket.
===== Path Parameters
==== Path Parameters
`job_id`::
(string) Identifier for the job
@ -28,7 +28,7 @@ This API presents a chronological view of the records, grouped by bucket.
about all buckets.
===== Request Body
==== Request Body
`anomaly_score`::
(double) Returns buckets with anomaly scores higher than this value.
@ -69,7 +69,7 @@ The API returns the following information:
<<ml-results-buckets,Buckets>>.
===== Authorization
==== Authorization
You must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` cluster
privileges to use this API. You also need `read` index privilege on the index
@ -78,7 +78,7 @@ roles provide these privileges. For more information, see
<<security-privileges>> and <<built-in-roles>>.
===== Examples
==== Examples
The following example gets bucket information for the `it-ops-kpi` job:

View File

@ -1,12 +1,12 @@
//lcawley Verified example output 2017-04-11
[[ml-get-category]]
==== Get Categories
=== Get Categories
The get categories API enables you to retrieve job results for one or more
categories.
===== Request
==== Request
`GET _xpack/ml/anomaly_detectors/<job_id>/results/categories` +
@ -14,7 +14,7 @@ categories.
//===== Description
===== Path Parameters
==== Path Parameters
`job_id`::
(string) Identifier for the job.
@ -24,7 +24,7 @@ categories.
the API returns information about all categories in the job.
===== Request Body
==== Request Body
`page`::
`from`:::
@ -33,7 +33,7 @@ categories.
(integer) Specifies the maximum number of categories to obtain.
===== Results
==== Results
The API returns the following information:
@ -42,7 +42,7 @@ The API returns the following information:
<<ml-results-categories,Categories>>.
===== Authorization
==== Authorization
You must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` cluster
privileges to use this API. You also need `read` index privilege on the index
@ -51,7 +51,7 @@ roles provide these privileges. For more information, see
<<security-privileges>> and <<built-in-roles>>.
===== Examples
==== Examples
The following example gets information about one category for the
`it_ops_new_logs` job:

View File

@ -1,25 +1,25 @@
//lcawley Verified example output 2017-04-11
[[ml-get-datafeed-stats]]
==== Get {dfeed-cap} Statistics
=== Get {dfeed-cap} Statistics
The get {dfeed} statistics API enables you to retrieve usage information for
{dfeeds}.
===== Request
==== Request
`GET _xpack/ml/datafeeds/_stats` +
`GET _xpack/ml/datafeeds/<feed_id>/_stats`
===== Description
==== Description
If the {dfeed} is stopped, the only information you receive is the
`datafeed_id` and the `state`.
===== Path Parameters
==== Path Parameters
`feed_id`::
(string) Identifier for the {dfeed}.
@ -27,7 +27,7 @@ If the {dfeed} is stopped, the only information you receive is the
omit the `feed_id` to get information about all {dfeeds}.
===== Results
==== Results
The API returns the following information:
@ -36,13 +36,13 @@ The API returns the following information:
For more information, see <<ml-datafeed-counts>>.
===== Authorization
==== Authorization
You must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` cluster
privileges to use this API. For more information, see <<privileges-list-cluster>>.
===== Examples
==== Examples
The following example gets usage information for the
`datafeed-farequote` {dfeed}:

View File

@ -1,11 +1,11 @@
//lcawley Verified example output 2017-04-11
[[ml-get-datafeed]]
==== Get {dfeeds-cap}
=== Get {dfeeds-cap}
The get {dfeeds} API enables you to retrieve configuration information for
{dfeeds}.
===== Request
==== Request
`GET _xpack/ml/datafeeds/` +
@ -13,7 +13,7 @@ The get {dfeeds} API enables you to retrieve configuration information for
//===== Description
===== Path Parameters
==== Path Parameters
`feed_id`::
(string) Identifier for the {dfeed}.
@ -21,7 +21,7 @@ The get {dfeeds} API enables you to retrieve configuration information for
omit the `feed_id` to get information about all {dfeeds}.
===== Results
==== Results
The API returns the following information:
@ -30,13 +30,13 @@ The API returns the following information:
For more information, see <<ml-datafeed-resource>>.
===== Authorization
==== Authorization
You must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` cluster
privileges to use this API. For more information, see <<privileges-list-cluster>>.
===== Examples
==== Examples
The following example gets configuration information for the
`datafeed-it-ops-kpi` {dfeed}:

View File

@ -1,22 +1,22 @@
[[ml-get-influencer]]
==== Get Influencers
=== Get Influencers
The get influencers API enables you to retrieve job results for one or more
influencers.
===== Request
==== Request
`GET _xpack/ml/anomaly_detectors/<job_id>/results/influencers`
//===== Description
===== Path Parameters
==== Path Parameters
`job_id`::
(string) Identifier for the job.
===== Request Body
==== Request Body
`desc`::
(boolean) If true, the results are sorted in descending order.
@ -45,7 +45,7 @@ influencers.
(string) Returns influencers with timestamps after this time.
===== Results
==== Results
The API returns the following information:
@ -54,7 +54,7 @@ The API returns the following information:
For more information, see <<ml-results-influencers,Influencers>>.
===== Authorization
==== Authorization
You must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` cluster
privileges to use this API. You also need `read` index privilege on the index
@ -63,7 +63,7 @@ roles provide these privileges. For more information, see
<<security-privileges>> and <<built-in-roles>>.
===== Examples
==== Examples
The following example gets influencer information for the `it_ops_new_kpi` job:

View File

@ -1,11 +1,11 @@
//lcawley Verified example output 2017-04-11
[[ml-get-job-stats]]
==== Get Job Statistics
=== Get Job Statistics
The get jobs API enables you to retrieve usage information for jobs.
===== Request
==== Request
`GET _xpack/ml/anomaly_detectors/_stats` +
@ -13,7 +13,7 @@ The get jobs API enables you to retrieve usage information for jobs.
//===== Description
===== Path Parameters
==== Path Parameters
`job_id`::
(string) A required identifier for the job.
@ -21,7 +21,7 @@ The get jobs API enables you to retrieve usage information for jobs.
the `job_id` to get information about all jobs.
===== Results
==== Results
The API returns the following information:
@ -30,13 +30,13 @@ The API returns the following information:
For more information, see <<ml-jobstats,Job Statistics>>.
===== Authorization
==== Authorization
You must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` cluster
privileges to use this API. For more information, see <<privileges-list-cluster>>.
===== Examples
==== Examples
The following example gets usage information for the `farequote` job:

View File

@ -1,11 +1,11 @@
//lcawley Verified example output 2017-04-11
[[ml-get-job]]
==== Get Jobs
=== Get Jobs
The get jobs API enables you to retrieve configuration information for jobs.
===== Request
==== Request
`GET _xpack/ml/anomaly_detectors/` +
@ -13,7 +13,7 @@ The get jobs API enables you to retrieve configuration information for jobs.
//===== Description
===== Path Parameters
==== Path Parameters
`job_id`::
(string) Identifier for the job.
@ -21,7 +21,7 @@ The get jobs API enables you to retrieve configuration information for jobs.
the `job_id` to get information about all jobs.
===== Results
==== Results
The API returns the following information:
@ -30,13 +30,13 @@ The API returns the following information:
For more information, see <<ml-job-resource,Job Resources>>.
===== Authorization
==== Authorization
You must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` cluster
privileges to use this API. For more information, see <<privileges-list-cluster>>.
===== Examples
==== Examples
The following example gets configuration information for the `farequote` job:

View File

@ -1,23 +1,23 @@
[[ml-get-record]]
//lcawley Verified example output 2017-04-11
==== Get Records
=== Get Records
The get records API enables you to retrieve anomaly records for a job.
===== Request
==== Request
`GET _xpack/ml/anomaly_detectors/<job_id>/results/records`
//===== Description
===== Path Parameters
==== Path Parameters
`job_id`::
(string) Identifier for the job.
===== Request Body
==== Request Body
`desc`::
(boolean) If true, the results are sorted in descending order.
@ -46,7 +46,7 @@ The get records API enables you to retrieve anomaly records for a job.
(string) Returns records with timestamps after this time.
===== Results
==== Results
The API returns the following information:
@ -55,7 +55,7 @@ The API returns the following information:
<<ml-results-records,Records>>.
===== Authorization
==== Authorization
You must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` cluster
privileges to use this API. You also need `read` index privilege on the index
@ -64,7 +64,7 @@ roles provide these privileges. For more information, see
<<security-privileges>> and <<built-in-roles>>.
===== Examples
==== Examples
The following example gets record information for the `it-ops-kpi` job:

View File

@ -1,11 +1,11 @@
//lcawley Verified example output 2017-04-11
[[ml-get-snapshot]]
==== Get Model Snapshots
=== Get Model Snapshots
The get model snapshots API enables you to retrieve information about model snapshots.
===== Request
==== Request
`GET _xpack/ml/anomaly_detectors/<job_id>/model_snapshots` +
@ -13,7 +13,7 @@ The get model snapshots API enables you to retrieve information about model snap
//===== Description
===== Path Parameters
==== Path Parameters
`job_id`::
(string) Identifier for the job.
@ -22,7 +22,7 @@ The get model snapshots API enables you to retrieve information about model snap
(string) Identifier for the model snapshot. If you do not specify this
optional parameter, the API returns information about all model snapshots.
===== Request Body
==== Request Body
`desc`::
(boolean) If true, the results are sorted in descending order.
@ -44,7 +44,7 @@ The get model snapshots API enables you to retrieve information about model snap
(string) Returns snapshots with timestamps after this time.
===== Results
==== Results
The API returns the following information:
@ -53,13 +53,13 @@ The API returns the following information:
<<ml-snapshot-resource,Model Snapshots>>.
===== Authorization
==== Authorization
You must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` cluster
privileges to use this API. For more information, see <<privileges-list-cluster>>.
===== Examples
==== Examples
The following example gets model snapshot information for the
`it_ops_new_logs` job:

View File

@ -1,6 +1,6 @@
//lcawley Verified example output 2017-04-11
[[ml-jobstats]]
==== Job Statistics
=== Job Statistics
The get job statistics API provides information about the operational
progress of a job.
@ -43,7 +43,7 @@ progress of a job.
[float]
[[ml-datacounts]]
===== Data Counts Objects
==== Data Counts Objects
The `data_counts` object describes the number of records processed
and any related error counts.
@ -128,7 +128,7 @@ necessarily a cause for concern.
[float]
[[ml-modelsizestats]]
===== Model Size Stats Objects
==== Model Size Stats Objects
The `model_size_stats` object has the following properties:
@ -178,7 +178,7 @@ NOTE: The `over` field values are counted separately for each detector and parti
[float]
[[ml-stats-node]]
===== Node Objects
==== Node Objects
The `node` objects contains properties for the node that runs the job.
This information is available only for open jobs.

View File

@ -1,6 +1,6 @@
//lcawley Verified example output 2017-04-11
[[ml-job-resource]]
==== Job Resources
=== Job Resources
A job resource has the following properties:
@ -73,7 +73,7 @@ so do not set the `background_persist_interval` value too low.
are retained.
[[ml-analysisconfig]]
===== Analysis Configuration Objects
==== Analysis Configuration Objects
An analysis configuration object has the following properties:
@ -152,7 +152,7 @@ LEAVE UNDOCUMENTED
[float]
[[ml-detectorconfig]]
===== Detector Configuration Objects
==== Detector Configuration Objects
Detector configuration objects specify which data fields a job analyzes.
They also specify which analytical functions are used.
@ -213,7 +213,7 @@ LEAVE UNDOCUMENTED
[float]
[[ml-datadescription]]
===== Data Description Objects
==== Data Description Objects
The data description defines the format of the input data when you send data to
the job by using the <<ml-post-data,post data>> API. Note that when configure
@ -247,7 +247,7 @@ job creation fails.
[float]
[[ml-apilimits]]
===== Analysis Limits
==== Analysis Limits
Limits can be applied for the resources required to hold the mathematical models in memory.
These limits are approximate and can be set per job. They do not control the
@ -272,7 +272,7 @@ NOTE: The `categorization_examples_limit` only applies to analysis that uses cat
[float]
[[ml-apimodelplotconfig]]
===== Model Plot Config
==== Model Plot Config
This advanced configuration option stores model information along with the
results. It provides a more detailed view into anomaly detection. If you enable

View File

@ -1,17 +1,17 @@
//lcawley Verified example output 2017-04-11
[[ml-open-job]]
==== Open Jobs
=== Open Jobs
A job must be opened in order for it to be ready to receive and analyze data.
A job can be opened and closed multiple times throughout its lifecycle.
===== Request
==== Request
`POST _xpack/ml/anomaly_detectors/{job_id}/_open`
===== Description
==== Description
A job must be open in order to it to accept and analyze data.
@ -21,13 +21,13 @@ When you open an existing job, the most recent model state is automatically load
The job is ready to resume its analysis from where it left off, once new data is received.
===== Path Parameters
==== Path Parameters
`job_id` (required)::
(string) Identifier for the job
===== Request Body
==== Request Body
`open_timeout`::
(time) Controls the time to wait until a job has opened.
@ -38,13 +38,13 @@ The job is ready to resume its analysis from where it left off, once new data is
last closed is treated as a maintenance window. That is to say, it is not an anomaly
===== Authorization
==== Authorization
You must have `manage_ml`, or `manage` cluster privileges to use this API.
For more information, see <<privileges-list-cluster>>.
===== Examples
==== Examples
The following example opens the `event_rate` job and sets an optional property:

View File

@ -1,16 +1,16 @@
//lcawley: Verified example output 2017-04-11
[[ml-post-data]]
==== Post Data to Jobs
=== Post Data to Jobs
The post data API enables you to send data to an anomaly detection job for analysis.
===== Request
==== Request
`POST _xpack/ml/anomaly_detectors/<job_id>/_data --data-binary @<data-file.json>`
===== Description
==== Description
The job must have a state of `open` to receive and process the data.
@ -35,13 +35,13 @@ It is not currently possible to post data to multiple jobs using wildcards
or a comma-separated list.
===== Path Parameters
==== Path Parameters
`job_id` (required)::
(string) Identifier for the job
===== Request Body
==== Request Body
`reset_start`::
(string) Specifies the start of the bucket resetting range
@ -50,13 +50,13 @@ or a comma-separated list.
(string) Specifies the end of the bucket resetting range
===== Authorization
==== Authorization
You must have `manage_ml`, or `manage` cluster privileges to use this API.
For more information, see <<privileges-list-cluster>>.
===== Examples
==== Examples
The following example posts data from the farequote.json file to the `farequote` job:

View File

@ -1,35 +1,35 @@
//lcawley: Verified example output 2017-04-11
[[ml-preview-datafeed]]
==== Preview {dfeeds-cap}
=== Preview {dfeeds-cap}
The preview {dfeed} API enables you to preview a {dfeed}.
===== Request
==== Request
`GET _xpack/ml/datafeeds/<datafeed_id>/_preview`
===== Description
==== Description
The API returns the first "page" of results from the `search` that is created
by using the current {dfeed} settings. This preview shows the structure of
the data that will be passed to the anomaly detection engine.
===== Path Parameters
==== Path Parameters
`datafeed_id` (required)::
(string) Identifier for the {dfeed}
===== Authorization
==== Authorization
You must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` cluster
privileges to use this API. For more information, see <<privileges-list-cluster>>.
===== Examples
==== Examples
The following example obtains a preview of the `datafeed-farequote` {dfeed}:

View File

@ -1,28 +1,28 @@
//lcawley Verified example output 2017-04-11
[[ml-put-datafeed]]
==== Create {dfeeds-cap}
=== Create {dfeeds-cap}
The create {dfeed} API enables you to instantiate a {dfeed}.
===== Request
==== Request
`PUT _xpack/ml/datafeeds/<feed_id>`
===== Description
==== Description
You must create a job before you create a {dfeed}. You can associate only one
{dfeed} to each job.
===== Path Parameters
==== Path Parameters
`feed_id` (required)::
(string) A numerical character string that uniquely identifies the {dfeed}.
===== Request Body
==== Request Body
`aggregations`::
(object) If set, the {dfeed} performs aggregation searches.
@ -61,7 +61,7 @@ You must create a job before you create a {dfeed}. You can associate only one
(object) Specifies scripts that evaluate custom expressions and returns
script fields to the {dfeed}.
The <<ml-detectorconfig,detector configuration objects>> in a job can contain
functions that use these script fields.
functions that use these script fields.
For more information,
see {ref}/search-request-script-fields.html[Script Fields].
@ -77,12 +77,12 @@ For more information about these properties,
see <<ml-datafeed-resource>>.
===== Authorization
==== Authorization
You must have `manage_ml`, or `manage` cluster privileges to use this API.
For more information, see <<privileges-list-cluster>>.
===== Examples
==== Examples
The following example creates the `datafeed-it-ops-kpi` {dfeed}:

View File

@ -1,22 +1,22 @@
//lcawley Verified example output 2017-04-11
[[ml-put-job]]
==== Create Jobs
=== Create Jobs
The create job API enables you to instantiate a job.
===== Request
==== Request
`PUT _xpack/ml/anomaly_detectors/<job_id>`
//===== Description
===== Path Parameters
==== Path Parameters
`job_id` (required)::
(string) Identifier for the job
===== Request Body
==== Request Body
`analysis_config`::
(object) The analysis configuration, which specifies how to analyze the data.
@ -43,12 +43,12 @@ The create job API enables you to instantiate a job.
`.ml-anomalies-shared`.
===== Authorization
==== Authorization
You must have `manage_ml`, or `manage` cluster privileges to use this API.
For more information, see <<privileges-list-cluster>>.
===== Examples
==== Examples
The following example creates the `it-ops-kpi` job:

View File

@ -1,6 +1,6 @@
//lcawley Verified example output 2017-04-11
[[ml-results-resource]]
==== Results Resources
=== Results Resources
Several different result types are created for each job. You can query anomaly
results for _buckets_, _influencers_ and _records_ by using the results API.
@ -44,7 +44,7 @@ timestamp or any calculated scores.
[float]
[[ml-results-buckets]]
===== Buckets
==== Buckets
Bucket results provide the top level, overall view of the job and are best for
alerting.
@ -109,7 +109,7 @@ the results for the bucket.
[float]
[[ml-results-bucket-influencers]]
===== Bucket Influencers
==== Bucket Influencers
Bucket influencer results are available as nested objects contained within
bucket results. These results are an aggregation for each type of influencer.
@ -171,7 +171,7 @@ An bucket influencer object has the following properties:
[float]
[[ml-results-influencers]]
===== Influencers
==== Influencers
Influencers are the entities that have contributed to, or are to blame for,
the anomalies. Influencer results are available only if an
@ -249,7 +249,7 @@ filter the anomaly results more easily.
[float]
[[ml-results-records]]
===== Records
==== Records
Records contain the detailed analytical results. They describe the anomalous
activity that has been identified in the input data based on the detector
@ -379,7 +379,7 @@ filter the anomaly results more easily.
[float]
[[ml-results-categories]]
===== Categories
==== Categories
When `categorization_field_name` is specified in the job configuration, it is
possible to view the definitions of the resulting categories. A category

View File

@ -1,15 +1,15 @@
//lcawley Verified example output 2017-04-11
[[ml-revert-snapshot]]
==== Revert Model Snapshots
=== Revert Model Snapshots
The revert model snapshot API enables you to revert to a specific snapshot.
===== Request
==== Request
`POST _xpack/ml/anomaly_detectors/<job_id>/model_snapshots/<snapshot_id>/_revert`
===== Description
==== Description
The {ml} feature in {xpack} reacts quickly to anomalous input, learning new behaviors in data.
Highly anomalous input increases the variance in the models whilst the system learns
@ -49,7 +49,7 @@ Model size (in bytes) is available as part of the Job Resource Model Size Stats.
IMPORTANT: Before you revert to a saved snapshot, you must close the job.
===== Path Parameters
==== Path Parameters
`job_id` (required)::
(string) Identifier for the job
@ -57,7 +57,7 @@ IMPORTANT: Before you revert to a saved snapshot, you must close the job.
`snapshot_id` (required)::
(string) Identifier for the model snapshot
===== Request Body
==== Request Body
`delete_intervening_results`::
(boolean) If true, deletes the results in the time period between the
@ -69,13 +69,13 @@ the job will not accept input data that is older than the current time.
If you want to resend data, then delete the intervening results.
===== Authorization
==== Authorization
You must have `manage_ml`, or `manage` cluster privileges to use this API.
For more information, see <<privileges-list-cluster>>.
===== Examples
==== Examples
The following example reverts to the `1491856080` snapshot for the
`it_ops_new_kpi` job:

View File

@ -1,6 +1,6 @@
//lcawley Verified example output 2017-04-11
[[ml-snapshot-resource]]
==== Model Snapshot Resources
=== Model Snapshot Resources
Model snapshots are saved to disk periodically.
By default, this is occurs approximately every 3 hours to 4 hours and is
@ -51,7 +51,7 @@ A model snapshot resource has the following properties:
[float]
[[ml-snapshot-stats]]
===== Model Size Statistics
==== Model Size Statistics
The `model_size_stats` object has the following properties:

View File

@ -1,15 +1,15 @@
//lcawley Verified example output 2017-04
[[ml-start-datafeed]]
==== Start {dfeeds-cap}
=== Start {dfeeds-cap}
A {dfeed} must be started in order to retrieve data from {es}.
A {dfeed} can be started and stopped multiple times throughout its lifecycle.
===== Request
==== Request
`POST _xpack/ml/datafeeds/<feed_id>/_start`
===== Description
==== Description
NOTE: Before you can start a {dfeed}, the job must be open. Otherwise, an error
occurs.
@ -50,12 +50,12 @@ processed record, the {dfeed} continues from 1 millisecond after the timestamp
of the latest processed record.
===== Path Parameters
==== Path Parameters
`feed_id` (required)::
(string) Identifier for the {dfeed}
===== Request Body
==== Request Body
`end`::
(string) The time that the {dfeed} should end. This value is exclusive.
@ -70,13 +70,13 @@ of the latest processed record.
The default value is 20 seconds.
===== Authorization
==== Authorization
You must have `manage_ml`, or `manage` cluster privileges to use this API.
For more information, see <<privileges-list-cluster>>.
===== Examples
==== Examples
The following example starts the `datafeed-it-ops-kpi` {dfeed}:

View File

@ -1,22 +1,22 @@
//lcawley Verified example output 2017-04-11
[[ml-stop-datafeed]]
==== Stop {dfeeds-cap}
=== Stop {dfeeds-cap}
A {dfeed} that is stopped ceases to retrieve data from {es}.
A {dfeed} can be started and stopped multiple times throughout its lifecycle.
===== Request
==== Request
`POST _xpack/ml/datafeeds/<feed_id>/_stop`
//===== Description
===== Path Parameters
==== Path Parameters
`feed_id` (required)::
(string) Identifier for the {dfeed}
===== Request Body
==== Request Body
`force`::
(boolean) If true, the {dfeed} is stopped forcefully.
@ -26,12 +26,12 @@ A {dfeed} can be started and stopped multiple times throughout its lifecycle.
The default value is 20 seconds.
===== Authorization
==== Authorization
You must have `manage_ml`, or `manage` cluster privileges to use this API.
For more information, see <<privileges-list-cluster>>.
===== Examples
==== Examples
The following example stops the `datafeed-it-ops-kpi` {dfeed}:

View File

@ -1,21 +1,21 @@
//lcawley Verified example output 2017-04
[[ml-update-datafeed]]
==== Update {dfeeds-cap}
=== Update {dfeeds-cap}
The update {dfeed} API enables you to update certain properties of a {dfeed}.
===== Request
==== Request
`POST _xpack/ml/datafeeds/<feed_id>/_update`
//===== Description
===== Path Parameters
==== Path Parameters
`feed_id` (required)::
(string) Identifier for the {dfeed}
===== Request Body
==== Request Body
The following properties can be updated after the {dfeed} is created:
@ -72,12 +72,12 @@ For more information about these properties,
see <<ml-datafeed-resource>>.
===== Authorization
==== Authorization
You must have `manage_ml`, or `manage` cluster privileges to use this API.
For more information, see <<privileges-list-cluster>>.
===== Examples
==== Examples
The following example updates the query for the `datafeed-it-ops-kpi` {dfeed}
so that only log entries of error level are analyzed:

View File

@ -1,20 +1,20 @@
//lcawley Verified example output 2017-04-11
[[ml-update-job]]
==== Update Jobs
=== Update Jobs
The update job API enables you to update certain properties of a job.
===== Request
==== Request
`POST _xpack/ml/anomaly_detectors/<job_id>/_update`
===== Path Parameters
==== Path Parameters
`job_id` (required)::
(string) Identifier for the job
===== Request Body
==== Request Body
The following properties can be updated after the job is created:
@ -71,13 +71,13 @@ want to re-run this job with an increased `model_memory_limit`.
--
===== Authorization
==== Authorization
You must have `manage_ml`, or `manage` cluster privileges to use this API.
For more information, see <<privileges-list-cluster>>.
===== Examples
==== Examples
The following example updates the `it_ops_new_logs` job:

View File

@ -1,22 +1,22 @@
//lcawley Verified example output 2017-04-11
[[ml-update-snapshot]]
==== Update Model Snapshots
=== Update Model Snapshots
The update model snapshot API enables you to update certain properties of a snapshot.
===== Request
==== Request
`POST _xpack/ml/anomaly_detectors/<job_id>/model_snapshots/<snapshot_id>/_update`
===== Description
==== Description
//TBD. Is the following still true? - not sure but close/open would be the method
Updates to the configuration are only applied after the job has been closed
and re-opened.
===== Path Parameters
==== Path Parameters
`job_id` (required)::
(string) Identifier for the job
@ -24,7 +24,7 @@ and re-opened.
`snapshot_id` (required)::
(string) Identifier for the model snapshot
===== Request Body
==== Request Body
The following properties can be updated after the model snapshot is created:
@ -39,13 +39,13 @@ The following properties can be updated after the model snapshot is created:
The default value is false.
===== Authorization
==== Authorization
You must have `manage_ml`, or `manage` cluster privileges to use this API.
For more information, see <<privileges-list-cluster>>.
===== Examples
==== Examples
The following example updates the snapshot identified as `1491852978`:

View File

@ -1,31 +1,31 @@
//lcawley Verified example output 2017-04-11
[[ml-valid-detector]]
==== Validate Detectors
=== Validate Detectors
The validate detectors API validates detector configuration information.
===== Request
==== Request
`POST _xpack/ml/anomaly_detectors/_validate/detector`
===== Description
==== Description
This API enables you validate the detector configuration before you create a job.
===== Request Body
==== Request Body
For a list of the properties that you can specify in the body of this API,
see <<ml-detectorconfig,detector configuration objects>>.
===== Authorization
==== Authorization
You must have `manage_ml`, or `manage` cluster privileges to use this API.
For more information, see <<privileges-list-cluster>>.
===== Examples
==== Examples
The following example validates detector configuration information:

View File

@ -1,31 +1,31 @@
//lcawley Verified example output 2017-04-11
[[ml-valid-job]]
==== Validate Jobs
=== Validate Jobs
The validate jobs API validates job configuration information.
===== Request
==== Request
`POST _xpack/ml/anomaly_detectors/_validate`
===== Description
==== Description
This API enables you validate the job configuration before you create the job.
===== Request Body
==== Request Body
For a list of the properties that you can specify in the body of this API,
see <<ml-job-resource,Job Resources>>.
===== Authorization
==== Authorization
You must have `manage_ml`, or `manage` cluster privileges to use this API.
For more information, see <<privileges-list-cluster>>.
===== Examples
==== Examples
The following example validates job configuration information: