OpenSearch/docs/reference/tasks/list.asciidoc
Igor Motov a89dba27c2 Task Management: Add framework for registering and communicating with tasks
Adds task manager class and enables all activities to register with the task manager. Currently, the immutable Transport*Activity class represents activity itself shared across all requests. This PR adds and an additional structure Task that keeps track of currently running requests and can be used to communicate with these requests using TransportTaskAction.

Related to #15117
2016-01-05 12:24:43 -05:00

47 lines
1.4 KiB
Plaintext

[[tasks-list]]
== Tasks List
The task management API allows to retrieve information about currently running tasks.
[source,js]
--------------------------------------------------
curl -XGET 'http://localhost:9200/_tasks'
curl -XGET 'http://localhost:9200/_tasks/nodeId1,nodeId2'
curl -XGET 'http://localhost:9200/_tasks/nodeId1,nodeId2/cluster:*'
--------------------------------------------------
The first command retrieves all tasks currently running on all nodes.
The second command selectively retrieves tasks from nodes
`nodeId1` and `nodeId2`. All the nodes selective options are explained
<<cluster-nodes,here>>.
The third command retrieves all cluster-related tasks running on nodes `nodeId1` and `nodeId2`.
The result will look similar to:
[source,js]
--------------------------------------------------
{
"nodes" : {
"fDlEl7PrQi6F-awHZ3aaDw" : {
"name" : "Gazer",
"transport_address" : "127.0.0.1:9300",
"host" : "127.0.0.1",
"ip" : "127.0.0.1:9300",
"tasks" : [ {
"node" : "fDlEl7PrQi6F-awHZ3aaDw",
"id" : 105,
"type" : "transport",
"action" : "cluster:monitor/nodes/tasks"
}, {
"node" : "fDlEl7PrQi6F-awHZ3aaDw",
"id" : 106,
"type" : "direct",
"action" : "cluster:monitor/nodes/tasks[n]",
"parent_node" : "fDlEl7PrQi6F-awHZ3aaDw",
"parent_id" : 105
} ]
}
}
}
--------------------------------------------------