2017-04-11 21:52:47 -04:00
|
|
|
//lcawley Verified example output 2017-04-11
|
2017-04-04 18:26:39 -04:00
|
|
|
[[ml-update-job]]
|
|
|
|
==== Update Jobs
|
|
|
|
|
|
|
|
The update job API allows you to update certain properties of a job.
|
|
|
|
|
|
|
|
===== Request
|
|
|
|
|
|
|
|
`POST _xpack/ml/anomaly_detectors/<job_id>/_update`
|
|
|
|
|
2017-04-18 18:13:21 -04:00
|
|
|
|
2017-04-25 17:08:29 -04:00
|
|
|
////
|
2017-04-04 18:26:39 -04:00
|
|
|
===== Description
|
|
|
|
|
2017-04-24 12:31:31 -04:00
|
|
|
//TBD: Important:: Updates do not take effect until after then job is closed and re-opened.
|
2017-04-25 17:08:29 -04:00
|
|
|
////
|
2017-04-04 18:26:39 -04:00
|
|
|
===== Path Parameters
|
|
|
|
|
|
|
|
`job_id` (required)::
|
2017-04-11 22:26:18 -04:00
|
|
|
(string) Identifier for the job
|
2017-04-04 18:26:39 -04:00
|
|
|
|
|
|
|
===== Request Body
|
|
|
|
|
|
|
|
The following properties can be updated after the job is created:
|
|
|
|
|
|
|
|
`analysis_config`::
|
2017-04-11 22:26:18 -04:00
|
|
|
(object) The analysis configuration, which specifies how to analyze the data.
|
2017-04-24 13:46:17 -04:00
|
|
|
See <<ml-analysisconfig, analysis configuration objects>>. In particular,
|
|
|
|
the following properties can be updated: `categorization_filters`,
|
|
|
|
`detector_description`, TBD.
|
2017-04-04 18:26:39 -04:00
|
|
|
|
|
|
|
`analysis_limits`::
|
2017-04-11 22:26:18 -04:00
|
|
|
(object) Specifies runtime limits for the job.
|
2017-04-24 13:46:17 -04:00
|
|
|
See <<ml-apilimits,analysis limits>>.
|
|
|
|
|
|
|
|
[NOTE]
|
|
|
|
--
|
|
|
|
* You can update the `analysis_limits` only while the job is closed.
|
|
|
|
* The `model_memory_limit` property value cannot be decreased.
|
|
|
|
* If the `memory_status` property in the `model_size_stats` object has a value
|
|
|
|
of `hard_limit`, this means that it was unable to process some data. You might
|
|
|
|
want to re-run this job with an increased `model_memory_limit`.
|
|
|
|
--
|
2017-04-04 18:26:39 -04:00
|
|
|
|
|
|
|
`description`::
|
2017-04-11 22:26:18 -04:00
|
|
|
(string) An optional description of the job.
|
2017-04-04 18:26:39 -04:00
|
|
|
|
|
|
|
|
2017-04-25 17:08:29 -04:00
|
|
|
===== Authorization
|
|
|
|
|
|
|
|
You must have `manage_ml`, or `manage` cluster privileges to use this API.
|
|
|
|
For more information, see <<privileges-list-cluster>>.
|
2017-04-04 18:26:39 -04:00
|
|
|
|
|
|
|
|
|
|
|
===== Examples
|
|
|
|
|
|
|
|
The following example updates the `it-ops-kpi` job:
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
2017-04-11 21:52:47 -04:00
|
|
|
POST _xpack/ml/anomaly_detectors/it-ops-kpi/_update
|
2017-04-04 18:26:39 -04:00
|
|
|
{
|
|
|
|
"description":"New description",
|
|
|
|
"analysis_limits":{
|
|
|
|
"model_memory_limit": 8192
|
|
|
|
}
|
|
|
|
}
|
|
|
|
--------------------------------------------------
|
|
|
|
// CONSOLE
|
|
|
|
// TEST[skip:todo]
|
|
|
|
|
|
|
|
When the job is updated, you receive the following results:
|
2017-04-21 11:23:27 -04:00
|
|
|
[source,js]
|
2017-04-04 18:26:39 -04:00
|
|
|
----
|
|
|
|
{
|
|
|
|
"job_id": "it-ops-kpi",
|
2017-04-11 21:52:47 -04:00
|
|
|
"job_type": "anomaly_detector",
|
2017-04-04 18:26:39 -04:00
|
|
|
"description": "New description",
|
|
|
|
...
|
|
|
|
"analysis_limits": {
|
|
|
|
"model_memory_limit": 8192
|
2017-04-11 21:52:47 -04:00
|
|
|
},
|
2017-04-04 18:26:39 -04:00
|
|
|
...
|
|
|
|
}
|
|
|
|
----
|