nodes-shutdown.asciidoc 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. [[cluster-nodes-shutdown]]
  2. == Nodes Shutdown
  3. The nodes shutdown API allows to shutdown one or more (or all) nodes in
  4. the cluster. Here is an example of shutting the `_local` node the
  5. request is directed to:
  6. [source,js]
  7. --------------------------------------------------
  8. $ curl -XPOST 'http://localhost:9200/_cluster/nodes/_local/_shutdown'
  9. --------------------------------------------------
  10. Specific node(s) can be shutdown as well using their respective node ids
  11. (or other selective options as explained
  12. <<cluster-nodes,here>> .):
  13. [source,js]
  14. --------------------------------------------------
  15. $ curl -XPOST 'http://localhost:9200/_cluster/nodes/nodeId1,nodeId2/_shutdown'
  16. --------------------------------------------------
  17. The master (of the cluster) can also be shutdown using:
  18. [source,js]
  19. --------------------------------------------------
  20. $ curl -XPOST 'http://localhost:9200/_cluster/nodes/_master/_shutdown'
  21. --------------------------------------------------
  22. Finally, all nodes can be shutdown using one of the options below:
  23. [source,js]
  24. --------------------------------------------------
  25. $ curl -XPOST 'http://localhost:9200/_shutdown'
  26. $ curl -XPOST 'http://localhost:9200/_cluster/nodes/_shutdown'
  27. $ curl -XPOST 'http://localhost:9200/_cluster/nodes/_all/_shutdown'
  28. --------------------------------------------------
  29. [float]
  30. === Delay
  31. By default, the shutdown will be executed after a 1 second delay (`1s`).
  32. The delay can be customized by setting the `delay` parameter in a time
  33. value format. For example:
  34. [source,js]
  35. --------------------------------------------------
  36. $ curl -XPOST 'http://localhost:9200/_cluster/nodes/_local/_shutdown?delay=10s'
  37. --------------------------------------------------
  38. [float]
  39. === Disable Shutdown
  40. The shutdown API can be disabled by setting `action.disable_shutdown` in
  41. the node configuration.