nodes-shutdown.asciidoc 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. === Delay
  32. By default, the shutdown will be executed after a 1 second delay (`1s`).
  33. The delay can be customized by setting the `delay` parameter in a time
  34. value format. For example:
  35. [source,js]
  36. --------------------------------------------------
  37. $ curl -XPOST 'http://localhost:9200/_cluster/nodes/_local/_shutdown?delay=10s'
  38. --------------------------------------------------
  39. [float]
  40. === Disable Shutdown
  41. The shutdown API can be disabled by setting `action.disable_shutdown` in
  42. the node configuration.