Get data frame analytics jobs statistics API
editGet data frame analytics jobs statistics API
editRetrieves usage information for data frame analytics jobs.
This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
Request
editGET _ml/data_frame/analytics/<data_frame_analytics_id>/_stats
GET _ml/data_frame/analytics/<data_frame_analytics_id>,<data_frame_analytics_id>/_stats
GET _ml/data_frame/analytics/_stats
GET _ml/data_frame/analytics/_all/_stats
GET _ml/data_frame/analytics/*/_stats
Prerequisites
editIf the Elasticsearch security features are enabled, you must have the following privileges:
-
cluster:
monitor_ml
For more information, see Security privileges and Built-in roles.
Path parameters
edit-
<data_frame_analytics_id>
- (Optional, string) Identifier for the data frame analytics job. If you do not specify this option, the API returns information for the first hundred data frame analytics jobs.
Query parameters
edit-
allow_no_match
-
(Optional, boolean) Specifies what to do when the request:
- Contains wildcard expressions and there are no data frame analytics jobs that match.
-
Contains the
_all
string or no identifiers and there are no matches. - Contains wildcard expressions and there are only partial matches.
The default value is
true
, which returns an emptydata_frame_analytics
array when there are no matches and the subset of results when there are partial matches. If this parameter isfalse
, the request returns a404
status code when there are no matches or only partial matches. -
from
-
(Optional, integer)
Skips the specified number of data frame analytics jobs. The default value is
0
. -
size
-
(Optional, integer)
Specifies the maximum number of data frame analytics jobs to obtain. The default value
is
100
.
Response body
editThe API returns the following information:
-
data_frame_analytics
-
(array) An array of statistics objects for data frame analytics jobs, which are sorted by the
id
value in ascending order.-
assignment_explanation
- (string) For running jobs only, contains messages relating to the selection of a node to run the job.
-
id
- (string) The unique identifier of the data frame analytics job.
-
node
- (object) Contains properties for the node that runs the job. This information is available only for running jobs.
-
node
.attributes
-
(object)
Lists node attributes such as
ml.machine_memory
,ml.max_open_jobs
, andxpack.installed
. -
node
.ephemeral_id
- (string) The ephemeral id of the node.
-
node
.id
- (string) The unique identifier of the node.
-
node
.name
- (string) The node name.
-
node
.transport_address
- (string) The host and port where transport HTTP connections are accepted.
-
progress
- (array) The progress report of the data frame analytics job by phase.
-
progress
.phase
-
(string)
Defines the phase of the data frame analytics job. Possible phases:
reindexing
,loading_data
,analyzing
, andwriting_results
. -
progress
.progress_percent
- (integer) The progress that the data frame analytics job has made expressed in percentage.
-
state
- (string) Current state of the data frame analytics job.
-
Response codes
edit-
404
(Missing resources) -
If
allow_no_match
isfalse
, this code indicates that there are no resources that match the request or only partial matches for the request.
Examples
editGET _ml/data_frame/analytics/loganalytics/_stats
The API returns the following results:
{ "count": 1, "data_frame_analytics": [ { "id": "loganalytics", "state": "stopped", "progress": [ { "phase": "reindexing", "progress_percent": 0 }, { "phase": "loading_data", "progress_percent": 0 }, { "phase": "analyzing", "progress_percent": 0 }, { "phase": "writing_results", "progress_percent": 0 } ] } ] }