1
0

nodes-task.asciidoc 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. [[nodes-task]]
  2. == Nodes Task API
  3. The nodes task management API retrieves information about the tasks currently
  4. executing on one or more nodes in the cluster.
  5. [source,js]
  6. --------------------------------------------------
  7. GET /_tasks <1>
  8. GET /_tasks/nodeId1,nodeId2 <2>
  9. GET /_tasks/nodeId1,nodeId2/cluster:* <3>
  10. --------------------------------------------------
  11. // AUTOSENSE
  12. <1> Retrieves all tasks currently running on all nodes in the cluster.
  13. <2> Retrieves all tasks running on nodes `nodeId1` and `nodeId2`. See <<cluster-nodes>> for more info about how to select individual nodes.
  14. <3> Retrieves all cluster-related tasks running on nodes `nodeId1` and `nodeId2`.
  15. The result will look similar to the following:
  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. {
  27. "node": "fDlEl7PrQi6F-awHZ3aaDw",
  28. "id": 105,
  29. "type": "transport",
  30. "action": "cluster:monitor/nodes/tasks"
  31. },
  32. {
  33. "node": "fDlEl7PrQi6F-awHZ3aaDw",
  34. "id": 106,
  35. "type": "direct",
  36. "action": "cluster:monitor/nodes/tasks[n]",
  37. "parent_node": "fDlEl7PrQi6F-awHZ3aaDw",
  38. "parent_id": 105
  39. }
  40. ]
  41. }
  42. }
  43. }
  44. --------------------------------------------------