2017-06-19 21:23:58 -04:00
|
|
|
[role="xpack"]
|
2017-04-04 18:26:39 -04:00
|
|
|
[[ml-get-datafeed]]
|
2017-06-06 16:42:47 -04:00
|
|
|
=== Get {dfeeds-cap}
|
2017-04-04 18:26:39 -04:00
|
|
|
|
2017-05-02 15:45:42 -04:00
|
|
|
The get {dfeeds} API enables you to retrieve configuration information for
|
|
|
|
{dfeeds}.
|
2017-04-04 18:26:39 -04:00
|
|
|
|
2017-06-06 16:42:47 -04:00
|
|
|
==== Request
|
2017-04-04 18:26:39 -04:00
|
|
|
|
|
|
|
`GET _xpack/ml/datafeeds/` +
|
|
|
|
|
|
|
|
`GET _xpack/ml/datafeeds/<feed_id>`
|
2017-04-18 18:13:21 -04:00
|
|
|
|
2017-04-25 17:08:29 -04:00
|
|
|
//===== Description
|
2017-04-18 18:13:21 -04:00
|
|
|
|
2017-06-06 16:42:47 -04:00
|
|
|
==== Path Parameters
|
2017-04-04 18:26:39 -04:00
|
|
|
|
|
|
|
`feed_id`::
|
2017-05-02 15:45:42 -04:00
|
|
|
(string) Identifier for the {dfeed}.
|
2017-04-24 13:46:17 -04:00
|
|
|
This parameter does not support wildcards, but you can specify `_all` or
|
2017-05-02 15:45:42 -04:00
|
|
|
omit the `feed_id` to get information about all {dfeeds}.
|
2017-04-04 18:26:39 -04:00
|
|
|
|
2017-04-25 17:08:29 -04:00
|
|
|
|
2017-06-06 16:42:47 -04:00
|
|
|
==== Results
|
2017-04-04 18:26:39 -04:00
|
|
|
|
2017-04-11 21:52:47 -04:00
|
|
|
The API returns the following information:
|
2017-04-04 18:26:39 -04:00
|
|
|
|
2017-04-11 21:52:47 -04:00
|
|
|
`datafeeds`::
|
2017-05-02 15:45:42 -04:00
|
|
|
(array) An array of {dfeed} objects.
|
|
|
|
For more information, see <<ml-datafeed-resource>>.
|
2017-04-04 18:26:39 -04:00
|
|
|
|
|
|
|
|
2017-06-06 16:42:47 -04:00
|
|
|
==== Authorization
|
2017-04-25 17:08:29 -04:00
|
|
|
|
|
|
|
You must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` cluster
|
2017-06-19 21:23:58 -04:00
|
|
|
privileges to use this API. For more information, see
|
|
|
|
{xpack-ref}/security-privileges.html[Security Privileges].
|
|
|
|
//<<privileges-list-cluster>>.
|
2017-04-25 17:08:29 -04:00
|
|
|
|
|
|
|
|
2017-06-06 16:42:47 -04:00
|
|
|
==== Examples
|
2017-04-04 18:26:39 -04:00
|
|
|
|
2017-04-11 21:52:47 -04:00
|
|
|
The following example gets configuration information for the
|
2017-05-02 15:45:42 -04:00
|
|
|
`datafeed-it-ops-kpi` {dfeed}:
|
2017-04-11 21:52:47 -04:00
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
|
|
|
GET _xpack/ml/datafeeds/datafeed-it-ops-kpi
|
|
|
|
--------------------------------------------------
|
|
|
|
// CONSOLE
|
|
|
|
// TEST[skip:todo]
|
|
|
|
|
|
|
|
The API returns the following results:
|
2017-04-21 11:23:27 -04:00
|
|
|
[source,js]
|
2017-04-04 18:26:39 -04:00
|
|
|
----
|
|
|
|
{
|
|
|
|
"count": 1,
|
|
|
|
"datafeeds": [
|
|
|
|
{
|
2017-04-11 21:52:47 -04:00
|
|
|
"datafeed_id": "datafeed-it-ops-kpi",
|
|
|
|
"job_id": "it-ops-kpi",
|
2017-04-04 18:26:39 -04:00
|
|
|
"query_delay": "60s",
|
|
|
|
"frequency": "150s",
|
|
|
|
"indexes": [
|
|
|
|
"it_ops_metrics"
|
|
|
|
],
|
|
|
|
"types": [
|
|
|
|
"kpi",
|
2017-04-11 21:52:47 -04:00
|
|
|
"network",
|
2017-04-04 18:26:39 -04:00
|
|
|
"sql"
|
|
|
|
],
|
|
|
|
"query": {
|
|
|
|
"match_all": {
|
|
|
|
"boost": 1
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"aggregations": {
|
2017-04-11 21:52:47 -04:00
|
|
|
"buckets": {
|
|
|
|
"date_histogram": {
|
2017-04-04 18:26:39 -04:00
|
|
|
"field": "@timestamp",
|
|
|
|
"interval": 30000,
|
|
|
|
"offset": 0,
|
|
|
|
"order": {
|
|
|
|
"_key": "asc"
|
|
|
|
},
|
|
|
|
"keyed": false,
|
|
|
|
"min_doc_count": 0
|
|
|
|
},
|
|
|
|
"aggregations": {
|
|
|
|
"events_per_min": {
|
|
|
|
"sum": {
|
|
|
|
"field": "events_per_min"
|
|
|
|
}
|
2017-04-11 21:52:47 -04:00
|
|
|
},
|
|
|
|
"@timestamp": {
|
|
|
|
"max": {
|
|
|
|
"field": "@timestamp"
|
|
|
|
}
|
2017-04-04 18:26:39 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2017-04-11 21:52:47 -04:00
|
|
|
"scroll_size": 1000,
|
|
|
|
"chunking_config": {
|
|
|
|
"mode": "manual",
|
|
|
|
"time_span": "30000000ms"
|
|
|
|
}
|
2017-04-04 18:26:39 -04:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
----
|