summaryrefslogtreecommitdiff
path: root/docs/reference/cluster/nodes-shutdown.asciidoc
diff options
context:
space:
mode:
Diffstat (limited to 'docs/reference/cluster/nodes-shutdown.asciidoc')
-rw-r--r--docs/reference/cluster/nodes-shutdown.asciidoc57
1 files changed, 57 insertions, 0 deletions
diff --git a/docs/reference/cluster/nodes-shutdown.asciidoc b/docs/reference/cluster/nodes-shutdown.asciidoc
new file mode 100644
index 0000000..65030a3
--- /dev/null
+++ b/docs/reference/cluster/nodes-shutdown.asciidoc
@@ -0,0 +1,57 @@
+[[cluster-nodes-shutdown]]
+== Nodes Shutdown
+
+The nodes shutdown API allows to shutdown one or more (or all) nodes in
+the cluster. Here is an example of shutting the `_local` node the
+request is directed to:
+
+[source,js]
+--------------------------------------------------
+$ curl -XPOST 'http://localhost:9200/_cluster/nodes/_local/_shutdown'
+--------------------------------------------------
+
+Specific node(s) can be shutdown as well using their respective node ids
+(or other selective options as explained
+<<cluster-nodes,here>> .):
+
+[source,js]
+--------------------------------------------------
+$ curl -XPOST 'http://localhost:9200/_cluster/nodes/nodeId1,nodeId2/_shutdown'
+--------------------------------------------------
+
+The master (of the cluster) can also be shutdown using:
+
+[source,js]
+--------------------------------------------------
+$ curl -XPOST 'http://localhost:9200/_cluster/nodes/_master/_shutdown'
+--------------------------------------------------
+
+Finally, all nodes can be shutdown using one of the options below:
+
+[source,js]
+--------------------------------------------------
+$ curl -XPOST 'http://localhost:9200/_shutdown'
+
+$ curl -XPOST 'http://localhost:9200/_cluster/nodes/_shutdown'
+
+$ curl -XPOST 'http://localhost:9200/_cluster/nodes/_all/_shutdown'
+--------------------------------------------------
+
+[float]
+[[delay]]
+=== Delay
+
+By default, the shutdown will be executed after a 1 second delay (`1s`).
+The delay can be customized by setting the `delay` parameter in a time
+value format. For example:
+
+[source,js]
+--------------------------------------------------
+$ curl -XPOST 'http://localhost:9200/_cluster/nodes/_local/_shutdown?delay=10s'
+--------------------------------------------------
+
+[float]
+=== Disable Shutdown
+
+The shutdown API can be disabled by setting `action.disable_shutdown` in
+the node configuration.