list.asciidoc 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. [[tasks-list]]
  2. == Tasks List
  3. The task management API allows to retrieve information about currently running tasks.
  4. [source,js]
  5. --------------------------------------------------
  6. curl -XGET 'http://localhost:9200/_tasks'
  7. curl -XGET 'http://localhost:9200/_tasks/nodeId1,nodeId2'
  8. curl -XGET 'http://localhost:9200/_tasks/nodeId1,nodeId2/cluster:*'
  9. --------------------------------------------------
  10. The first command retrieves all tasks currently running on all nodes.
  11. The second command selectively retrieves tasks from nodes
  12. `nodeId1` and `nodeId2`. All the nodes selective options are explained
  13. <<cluster-nodes,here>>.
  14. The third command retrieves all cluster-related tasks running on nodes `nodeId1` and `nodeId2`.
  15. The result will look similar to:
  16. [source,js]
  17. --------------------------------------------------
  18. {
  19. "nodes" : {
  20. "fDlEl7PrQi6F-awHZ3aaDw" : {
  21. "name" : "Gazer",
  22. "transport_address" : "127.0.0.1:9300",
  23. "host" : "127.0.0.1",
  24. "ip" : "127.0.0.1:9300",
  25. "tasks" : [ {
  26. "node" : "fDlEl7PrQi6F-awHZ3aaDw",
  27. "id" : 105,
  28. "type" : "transport",
  29. "action" : "cluster:monitor/nodes/tasks"
  30. }, {
  31. "node" : "fDlEl7PrQi6F-awHZ3aaDw",
  32. "id" : 106,
  33. "type" : "direct",
  34. "action" : "cluster:monitor/nodes/tasks[n]",
  35. "parent_node" : "fDlEl7PrQi6F-awHZ3aaDw",
  36. "parent_id" : 105
  37. } ]
  38. }
  39. }
  40. }
  41. --------------------------------------------------