2019-07-05 07:34:05 -04:00
|
|
|
[role="xpack"]
|
|
|
|
[testenv="platinum"]
|
|
|
|
[[get-dfanalytics]]
|
2020-07-20 16:06:29 -04:00
|
|
|
= Get {dfanalytics-jobs} API
|
2019-07-05 07:34:05 -04:00
|
|
|
[subs="attributes"]
|
|
|
|
++++
|
|
|
|
<titleabbrev>Get {dfanalytics-jobs}</titleabbrev>
|
|
|
|
++++
|
|
|
|
|
|
|
|
Retrieves configuration information for {dfanalytics-jobs}.
|
|
|
|
|
2019-07-12 11:26:31 -04:00
|
|
|
experimental[]
|
|
|
|
|
2019-12-13 05:48:21 -05:00
|
|
|
|
2019-07-05 07:34:05 -04:00
|
|
|
[[ml-get-dfanalytics-request]]
|
2020-07-20 16:06:29 -04:00
|
|
|
== {api-request-title}
|
2019-07-05 07:34:05 -04:00
|
|
|
|
|
|
|
`GET _ml/data_frame/analytics/<data_frame_analytics_id>` +
|
|
|
|
|
|
|
|
`GET _ml/data_frame/analytics/<data_frame_analytics_id>,<data_frame_analytics_id>` +
|
|
|
|
|
|
|
|
`GET _ml/data_frame/analytics/` +
|
|
|
|
|
|
|
|
`GET _ml/data_frame/analytics/_all`
|
|
|
|
|
2019-12-13 05:48:21 -05:00
|
|
|
|
2019-07-05 07:34:05 -04:00
|
|
|
[[ml-get-dfanalytics-prereq]]
|
2020-07-20 16:06:29 -04:00
|
|
|
== {api-prereq-title}
|
2019-07-05 07:34:05 -04:00
|
|
|
|
2020-01-09 04:44:07 -05:00
|
|
|
If the {es} {security-features} are enabled, you must have the following privileges:
|
|
|
|
|
|
|
|
* cluster: `monitor_ml`
|
|
|
|
|
2020-07-23 19:43:10 -04:00
|
|
|
For more information, see <<security-privileges>> and {ml-docs-setup-privileges}.
|
2019-12-13 05:48:21 -05:00
|
|
|
|
2019-07-05 07:34:05 -04:00
|
|
|
|
|
|
|
[[ml-get-dfanalytics-desc]]
|
2020-07-20 16:06:29 -04:00
|
|
|
== {api-description-title}
|
2019-07-05 07:34:05 -04:00
|
|
|
|
|
|
|
You can get information for multiple {dfanalytics-jobs} in a single API request
|
2019-07-26 05:39:59 -04:00
|
|
|
by using a comma-separated list of {dfanalytics-jobs} or a wildcard expression.
|
2019-07-05 07:34:05 -04:00
|
|
|
|
2019-12-13 05:48:21 -05:00
|
|
|
|
2019-07-05 07:34:05 -04:00
|
|
|
[[ml-get-dfanalytics-path-params]]
|
2020-07-20 16:06:29 -04:00
|
|
|
== {api-path-parms-title}
|
2019-07-05 07:34:05 -04:00
|
|
|
|
2019-07-12 11:26:31 -04:00
|
|
|
`<data_frame_analytics_id>`::
|
2019-12-13 05:48:21 -05:00
|
|
|
(Optional, string)
|
2020-06-01 16:46:15 -04:00
|
|
|
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=job-id-data-frame-analytics-default]
|
2019-12-13 05:48:21 -05:00
|
|
|
+
|
|
|
|
--
|
|
|
|
You can get information for all {dfanalytics-jobs} by using _all, by specifying
|
|
|
|
`*` as the `<data_frame_analytics_id>`, or by omitting the
|
|
|
|
`<data_frame_analytics_id>`.
|
|
|
|
--
|
|
|
|
|
2019-07-05 07:34:05 -04:00
|
|
|
|
|
|
|
[[ml-get-dfanalytics-query-params]]
|
2020-07-20 16:06:29 -04:00
|
|
|
== {api-query-parms-title}
|
2019-07-05 07:34:05 -04:00
|
|
|
|
2019-07-12 11:26:31 -04:00
|
|
|
`allow_no_match`::
|
2019-12-13 05:48:21 -05:00
|
|
|
(Optional, boolean)
|
2020-06-01 16:46:15 -04:00
|
|
|
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=allow-no-match]
|
2019-07-10 20:58:17 -04:00
|
|
|
|
2019-07-12 11:26:31 -04:00
|
|
|
`from`::
|
2019-12-13 05:48:21 -05:00
|
|
|
(Optional, integer)
|
2020-06-01 16:46:15 -04:00
|
|
|
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=from]
|
2019-07-05 07:34:05 -04:00
|
|
|
|
2019-07-12 11:26:31 -04:00
|
|
|
`size`::
|
2019-12-13 05:48:21 -05:00
|
|
|
(Optional, integer)
|
2020-06-01 16:46:15 -04:00
|
|
|
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=size]
|
2019-12-13 05:48:21 -05:00
|
|
|
|
2020-03-31 15:51:04 -04:00
|
|
|
[role="child_attributes"]
|
2019-07-11 12:05:05 -04:00
|
|
|
[[ml-get-dfanalytics-results]]
|
2020-07-20 16:06:29 -04:00
|
|
|
== {api-response-body-title}
|
2019-07-11 12:05:05 -04:00
|
|
|
|
|
|
|
`data_frame_analytics`::
|
2020-04-14 21:47:09 -04:00
|
|
|
(array)
|
|
|
|
An array of {dfanalytics-job} resources, which are sorted by the `id` value in
|
|
|
|
ascending order.
|
|
|
|
+
|
|
|
|
.Properties of {dfanalytics-job} resources
|
|
|
|
[%collapsible%open]
|
|
|
|
====
|
|
|
|
`analysis`:::
|
|
|
|
(object) The type of analysis that is performed on the `source`.
|
|
|
|
|
|
|
|
//Begin analyzed_fields
|
|
|
|
`analyzed_fields`:::
|
|
|
|
(object) Contains `includes` and/or `excludes` patterns that select which fields
|
|
|
|
are included in the analysis.
|
|
|
|
+
|
|
|
|
.Properties of `analyzed_fields`
|
|
|
|
[%collapsible%open]
|
|
|
|
=====
|
|
|
|
`excludes`:::
|
|
|
|
(Optional, array) An array of strings that defines the fields that are excluded
|
|
|
|
from the analysis.
|
|
|
|
|
|
|
|
`includes`:::
|
|
|
|
(Optional, array) An array of strings that defines the fields that are included
|
|
|
|
in the analysis.
|
|
|
|
=====
|
|
|
|
//End analyzed_fields
|
|
|
|
//Begin dest
|
|
|
|
`dest`:::
|
|
|
|
(string) The destination configuration of the analysis.
|
|
|
|
+
|
|
|
|
.Properties of `dest`
|
|
|
|
[%collapsible%open]
|
|
|
|
=====
|
|
|
|
`index`:::
|
|
|
|
(string) The _destination index_ that stores the results of the
|
|
|
|
{dfanalytics-job}.
|
|
|
|
|
|
|
|
`results_field`:::
|
|
|
|
(string) The name of the field that stores the results of the analysis. Defaults
|
|
|
|
to `ml`.
|
|
|
|
=====
|
|
|
|
//End dest
|
|
|
|
|
|
|
|
`id`:::
|
|
|
|
(string) The unique identifier of the {dfanalytics-job}.
|
|
|
|
|
|
|
|
`model_memory_limit`:::
|
|
|
|
(string) The `model_memory_limit` that has been set to the {dfanalytics-job}.
|
|
|
|
|
|
|
|
`source`:::
|
|
|
|
(object) The configuration of how the analysis data is sourced. It has an
|
|
|
|
`index` parameter and optionally a `query` and a `_source`.
|
|
|
|
+
|
|
|
|
.Properties of `source`
|
|
|
|
[%collapsible%open]
|
|
|
|
=====
|
|
|
|
`index`:::
|
|
|
|
(array) Index or indices on which to perform the analysis. It can be a single
|
|
|
|
index or index pattern as well as an array of indices or patterns.
|
|
|
|
|
|
|
|
`query`:::
|
|
|
|
(object) The query that has been specified for the {dfanalytics-job}. The {es}
|
|
|
|
query domain-specific language (<<query-dsl,DSL>>). This value corresponds to
|
|
|
|
the query object in an {es} search POST body. By default, this property has the
|
|
|
|
following value: `{"match_all": {}}`.
|
|
|
|
|
|
|
|
`_source`:::
|
|
|
|
(object) Contains the specified `includes` and/or `excludes` patterns that
|
|
|
|
select which fields are present in the destination. Fields that are excluded
|
|
|
|
cannot be included in the analysis.
|
|
|
|
+
|
|
|
|
.Properties of `_source`
|
|
|
|
[%collapsible%open]
|
|
|
|
======
|
|
|
|
`excludes`:::
|
|
|
|
(array) An array of strings that defines the fields that are excluded from the
|
|
|
|
destination.
|
|
|
|
|
|
|
|
`includes`:::
|
|
|
|
(array) An array of strings that defines the fields that are included in the
|
|
|
|
destination.
|
|
|
|
======
|
|
|
|
//End of _source
|
|
|
|
=====
|
|
|
|
//End source
|
|
|
|
====
|
2019-12-13 05:48:21 -05:00
|
|
|
|
2019-07-05 07:34:05 -04:00
|
|
|
|
2019-07-26 05:39:59 -04:00
|
|
|
[[ml-get-dfanalytics-response-codes]]
|
2020-07-20 16:06:29 -04:00
|
|
|
== {api-response-codes-title}
|
2019-07-26 05:39:59 -04:00
|
|
|
|
|
|
|
`404` (Missing resources)::
|
|
|
|
If `allow_no_match` is `false`, this code indicates that there are no
|
|
|
|
resources that match the request or only partial matches for the request.
|
|
|
|
|
2019-12-13 05:48:21 -05:00
|
|
|
|
2019-07-05 07:34:05 -04:00
|
|
|
[[ml-get-dfanalytics-example]]
|
2020-07-20 16:06:29 -04:00
|
|
|
== {api-examples-title}
|
2019-07-05 07:34:05 -04:00
|
|
|
|
|
|
|
The following example gets configuration information for the `loganalytics`
|
|
|
|
{dfanalytics-job}:
|
|
|
|
|
2019-09-09 12:35:50 -04:00
|
|
|
[source,console]
|
2019-07-05 07:34:05 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
GET _ml/data_frame/analytics/loganalytics
|
|
|
|
--------------------------------------------------
|
|
|
|
// TEST[skip:TBD]
|
|
|
|
|
|
|
|
The API returns the following results:
|
|
|
|
|
2019-09-06 09:22:08 -04:00
|
|
|
[source,console-result]
|
2019-07-05 07:34:05 -04:00
|
|
|
----
|
|
|
|
{
|
2020-07-21 15:49:58 -04:00
|
|
|
"count": 1,
|
|
|
|
"data_frame_analytics": [
|
|
|
|
{
|
|
|
|
"id": "loganalytics",
|
|
|
|
"source": {
|
|
|
|
"index": "logdata",
|
|
|
|
"query": {
|
|
|
|
"match_all": {}
|
2019-07-05 07:34:05 -04:00
|
|
|
}
|
2020-07-21 15:49:58 -04:00
|
|
|
},
|
|
|
|
"dest": {
|
|
|
|
"index": "logdata_out",
|
|
|
|
"results_field": "ml"
|
|
|
|
},
|
|
|
|
"analysis": {
|
|
|
|
"outlier_detection": {}
|
|
|
|
},
|
|
|
|
"model_memory_limit": "1gb",
|
|
|
|
"create_time": 1562265491319,
|
|
|
|
"version": "8.0.0"
|
|
|
|
}
|
|
|
|
]
|
2019-07-05 07:34:05 -04:00
|
|
|
}
|
|
|
|
----
|