2017-04-11 21:52:47 -04:00
|
|
|
//lcawley Verified example output 2017-04
|
2017-04-04 18:26:39 -04:00
|
|
|
[[ml-start-datafeed]]
|
2017-05-02 15:45:42 -04:00
|
|
|
==== Start {dfeeds-cap}
|
2017-04-04 18:26:39 -04:00
|
|
|
|
2017-05-02 15:45:42 -04:00
|
|
|
A {dfeed} must be started in order to retrieve data from {es}.
|
|
|
|
A {dfeed} can be started and stopped multiple times throughout its lifecycle.
|
2017-04-04 18:26:39 -04:00
|
|
|
|
|
|
|
===== Request
|
|
|
|
|
|
|
|
`POST _xpack/ml/datafeeds/<feed_id>/_start`
|
|
|
|
|
|
|
|
===== Description
|
|
|
|
|
2017-05-02 15:45:42 -04:00
|
|
|
NOTE: Before you can start a {dfeed}, the job must be open. Otherwise, an error
|
2017-04-11 21:52:47 -04:00
|
|
|
occurs.
|
|
|
|
|
2017-05-02 15:45:42 -04:00
|
|
|
When you start a {dfeed}, you can specify a start time. This enables you to
|
2017-04-10 11:59:27 -04:00
|
|
|
include a training period, providing you have this data available in {es}.
|
|
|
|
If you want to analyze from the beginning of a dataset, you can specify any date
|
|
|
|
earlier than that beginning date.
|
2017-04-04 18:26:39 -04:00
|
|
|
|
2017-05-02 15:45:42 -04:00
|
|
|
If you do not specify a start time and the {dfeed} is associated with a new
|
2017-04-10 11:59:27 -04:00
|
|
|
job, the analysis starts from the earliest time for which data is available.
|
|
|
|
|
2017-05-02 15:45:42 -04:00
|
|
|
When you start a {dfeed}, you can also specify an end time. If you do so, the
|
2017-04-10 11:59:27 -04:00
|
|
|
job analyzes data from the start time until the end time, at which point the
|
|
|
|
analysis stops. This scenario is useful for a one-off batch analysis. If you
|
2017-05-02 15:45:42 -04:00
|
|
|
do not specify an end time, the {dfeed} runs continuously.
|
2017-04-10 11:59:27 -04:00
|
|
|
|
2017-04-11 21:52:47 -04:00
|
|
|
The `start` and `end` times can be specified by using one of the
|
|
|
|
following formats: +
|
|
|
|
|
|
|
|
- ISO 8601 format with milliseconds, for example `2017-01-22T06:00:00.000Z`
|
|
|
|
- ISO 8601 format without milliseconds, for example `2017-01-22T06:00:00+00:00`
|
|
|
|
- Seconds from the Epoch, for example `1390370400`
|
|
|
|
|
|
|
|
Date-time arguments using either of the ISO 8601 formats must have a time zone
|
|
|
|
designator, where Z is accepted as an abbreviation for UTC time.
|
|
|
|
|
|
|
|
NOTE: When a URL is expected (for example, in browsers), the `+` used in time
|
|
|
|
zone designators must be encoded as `%2B`.
|
|
|
|
|
2017-05-02 15:45:42 -04:00
|
|
|
If the system restarts, any jobs that had {dfeeds} running are also restarted.
|
2017-04-10 11:59:27 -04:00
|
|
|
|
2017-05-02 15:45:42 -04:00
|
|
|
When a stopped {dfeed} is restarted, it continues processing input data from
|
2017-05-03 11:38:31 -04:00
|
|
|
the next millisecond after it was stopped. If new data was indexed for that
|
2017-05-03 12:07:44 -04:00
|
|
|
exact millisecond between stopping and starting, it will be ignored.
|
2017-04-10 11:59:27 -04:00
|
|
|
If you specify a `start` value that is earlier than the timestamp of the latest
|
2017-05-03 11:38:31 -04:00
|
|
|
processed record, the {dfeed} continues from 1 millisecond after the timestamp
|
|
|
|
of the latest processed record.
|
2017-04-10 11:59:27 -04:00
|
|
|
|
2017-04-18 18:13:21 -04:00
|
|
|
|
2017-04-04 18:26:39 -04:00
|
|
|
===== Path Parameters
|
|
|
|
|
|
|
|
`feed_id` (required)::
|
2017-05-02 15:45:42 -04:00
|
|
|
(string) Identifier for the {dfeed}
|
2017-04-10 11:59:27 -04:00
|
|
|
|
2017-04-04 18:26:39 -04:00
|
|
|
===== Request Body
|
|
|
|
|
2017-04-10 11:59:27 -04:00
|
|
|
`end`::
|
2017-05-02 15:45:42 -04:00
|
|
|
(string) The time that the {dfeed} should end. This value is exclusive.
|
2017-04-10 11:59:27 -04:00
|
|
|
The default value is an empty string.
|
2017-04-04 18:26:39 -04:00
|
|
|
|
2017-04-10 11:59:27 -04:00
|
|
|
`start`::
|
2017-05-02 15:45:42 -04:00
|
|
|
(string) The time that the {dfeed} should begin. This value is inclusive.
|
2017-04-10 11:59:27 -04:00
|
|
|
The default value is an empty string.
|
2017-04-04 18:26:39 -04:00
|
|
|
|
2017-04-10 11:59:27 -04:00
|
|
|
`timeout`::
|
2017-05-02 15:45:42 -04:00
|
|
|
(time) Controls the amount of time to wait until a {dfeed} starts.
|
2017-04-10 11:59:27 -04:00
|
|
|
The default value is 20 seconds.
|
|
|
|
|
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
|
|
|
|
|
2017-05-02 15:45:42 -04:00
|
|
|
The following example starts the `datafeed-it-ops-kpi` {dfeed}:
|
2017-04-04 18:26:39 -04:00
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
2017-04-10 11:59:27 -04:00
|
|
|
POST _xpack/ml/datafeeds/datafeed-it-ops-kpi/_start
|
2017-04-04 18:26:39 -04:00
|
|
|
{
|
2017-04-10 11:59:27 -04:00
|
|
|
"start": "2017-04-07T18:22:16Z"
|
2017-04-04 18:26:39 -04:00
|
|
|
}
|
|
|
|
--------------------------------------------------
|
|
|
|
// CONSOLE
|
|
|
|
// TEST[skip:todo]
|
|
|
|
|
2017-05-02 15:45:42 -04:00
|
|
|
When the {dfeed} starts, you receive the following results:
|
2017-04-21 11:23:27 -04:00
|
|
|
[source,js]
|
2017-04-04 18:26:39 -04:00
|
|
|
----
|
|
|
|
{
|
2017-04-10 11:59:27 -04:00
|
|
|
"started": true
|
2017-04-04 18:26:39 -04:00
|
|
|
}
|
|
|
|
----
|