2017-06-19 21:23:58 -04:00
|
|
|
[role="xpack"]
|
2017-04-04 18:26:39 -04:00
|
|
|
[[ml-get-job-stats]]
|
2017-06-06 16:42:47 -04:00
|
|
|
=== Get Job Statistics
|
2017-04-04 18:26:39 -04:00
|
|
|
|
2017-04-26 18:29:55 -04:00
|
|
|
The get jobs API enables you to retrieve usage information for jobs.
|
2017-04-04 18:26:39 -04:00
|
|
|
|
2017-04-25 17:08:29 -04:00
|
|
|
|
2017-06-06 16:42:47 -04:00
|
|
|
==== Request
|
2017-04-04 18:26:39 -04:00
|
|
|
|
2017-04-06 10:56:46 -04:00
|
|
|
`GET _xpack/ml/anomaly_detectors/_stats` +
|
2017-04-04 18:26:39 -04:00
|
|
|
|
2017-04-06 10:56:46 -04:00
|
|
|
`GET _xpack/ml/anomaly_detectors/<job_id>/_stats`
|
2017-04-04 18:26:39 -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
|
|
|
|
|
|
|
`job_id`::
|
2017-04-24 13:46:17 -04:00
|
|
|
(string) A required identifier for the job.
|
|
|
|
This parameter does not support wildcards, but you can specify `_all` or omit
|
|
|
|
the `job_id` to get information about all jobs.
|
2017-04-04 18:26:39 -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
|
|
|
`jobs`::
|
2017-05-08 09:53:04 -04:00
|
|
|
(array) An array of job statistics objects.
|
|
|
|
For more information, see <<ml-jobstats,Job Statistics>>.
|
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 usage information for the `farequote` job:
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
|
|
|
GET _xpack/ml/anomaly_detectors/farequote/_stats
|
|
|
|
--------------------------------------------------
|
|
|
|
// CONSOLE
|
|
|
|
// TEST[skip:todo]
|
|
|
|
|
2017-05-08 09:53:04 -04:00
|
|
|
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,
|
|
|
|
"jobs": [
|
|
|
|
{
|
2017-04-11 21:52:47 -04:00
|
|
|
"job_id": "farequote",
|
2017-04-04 18:26:39 -04:00
|
|
|
"data_counts": {
|
2017-04-11 21:52:47 -04:00
|
|
|
"job_id": "farequote",
|
|
|
|
"processed_record_count": 86275,
|
|
|
|
"processed_field_count": 172550,
|
|
|
|
"input_bytes": 6744714,
|
|
|
|
"input_field_count": 172550,
|
2017-04-04 18:26:39 -04:00
|
|
|
"invalid_date_count": 0,
|
|
|
|
"missing_field_count": 0,
|
|
|
|
"out_of_order_timestamp_count": 0,
|
|
|
|
"empty_bucket_count": 0,
|
2017-04-11 21:52:47 -04:00
|
|
|
"sparse_bucket_count": 15,
|
|
|
|
"bucket_count": 1528,
|
|
|
|
"earliest_record_timestamp": 1454803200000,
|
|
|
|
"latest_record_timestamp": 1455235196000,
|
|
|
|
"last_data_time": 1491948163685,
|
|
|
|
"latest_sparse_bucket_timestamp": 1455174900000,
|
|
|
|
"input_record_count": 86275
|
2017-04-04 18:26:39 -04:00
|
|
|
},
|
|
|
|
"model_size_stats": {
|
2017-04-11 21:52:47 -04:00
|
|
|
"job_id": "farequote",
|
2017-04-04 18:26:39 -04:00
|
|
|
"result_type": "model_size_stats",
|
2017-04-11 21:52:47 -04:00
|
|
|
"model_bytes": 387594,
|
|
|
|
"total_by_field_count": 21,
|
2017-04-04 18:26:39 -04:00
|
|
|
"total_over_field_count": 0,
|
2017-04-11 21:52:47 -04:00
|
|
|
"total_partition_field_count": 20,
|
2017-04-04 18:26:39 -04:00
|
|
|
"bucket_allocation_failures_count": 0,
|
|
|
|
"memory_status": "ok",
|
2017-04-11 21:52:47 -04:00
|
|
|
"log_time": 1491948163000,
|
|
|
|
"timestamp": 1455234600000
|
2017-04-04 18:26:39 -04:00
|
|
|
},
|
|
|
|
"state": "closed"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
----
|