原文地址: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/cat-tasks.html, 原文档版权归 www.elastic.co 所有

cat task management APIedit

The cat task management API is new and should still be considered a beta feature. The API may change in ways that are not backwards compatible. For feature status, see #51628.

Returns information about tasks currently executing in the cluster, similar to the task management API.

Requestedit

GET /_cat/tasks

Descriptionedit

The cat task management API returns information about tasks currently executing on one or more nodes in the cluster. It is a more compact view of the JSON task management API.

Query parametersedit

detailed
(Optional, boolean) If true, the response includes detailed information about shard recoveries. Defaults to false.
format
(Optional, string) Short version of the HTTP accept header. Valid values include JSON, YAML, etc.
h
(Optional, string) Comma-separated list of column names to display.
help
(Optional, boolean) If true, the response includes help information. Defaults to false.
s
(Optional, string) Comma-separated list of column names or column aliases used to sort the response.
time
(Optional, time units) Unit used to display time values.
v
(Optional, boolean) If true, the response includes column headings. Defaults to false.

Response codesedit

404 (Missing resources)
If <task_id> is specified but not found, this code indicates that there are no resources that match the request.

Examplesedit

GET _cat/tasks?v

The API returns the following response:

action                         task_id                    parent_task_id             type      start_time    timestamp running_time ip             node
cluster:monitor/tasks/lists[n] oTUltX4IQMOUUVeiohTt8A:124 oTUltX4IQMOUUVeiohTt8A:123 direct    1458585884904 01:48:24  44.1micros   127.0.0.1:9300 oTUltX4IQMOUUVeiohTt8A
cluster:monitor/tasks/lists    oTUltX4IQMOUUVeiohTt8A:123 -                          transport 1458585884904 01:48:24  186.2micros  127.0.0.1:9300 oTUltX4IQMOUUVeiohTt8A