diff --git a/docs/static/setting-up-logstash.asciidoc b/docs/static/setting-up-logstash.asciidoc index 803e56de5..80484ba18 100644 --- a/docs/static/setting-up-logstash.asciidoc +++ b/docs/static/setting-up-logstash.asciidoc @@ -197,6 +197,8 @@ startup styles they use. This list is intended to be informative, not exhaustiv | CentOS (and RHEL) 6 | <> | |======================================================================= +For info about shutting down Logstash safely, see <>. + [[running-logstash-systemd]] ==== Running Logstash by Using Systemd diff --git a/docs/static/shutdown.asciidoc b/docs/static/shutdown.asciidoc index ceb4777dc..d2288a214 100644 --- a/docs/static/shutdown.asciidoc +++ b/docs/static/shutdown.asciidoc @@ -1,6 +1,38 @@ [[shutdown]] === Shutting Down Logstash +To shut down Logstash, use one of the following commands: + +* On systemd, use: ++ +[source,shell] +---- +systemctl stop logstash +---- + +* On upstart, use: ++ +[source,shell] +---- +initctl stop logstash +---- + +* On sysv, use: ++ +[source,shell] +---- +/etc/init.d/logstash stop +---- + +* If you have the PID, use: ++ +[source,shell] +---- +kill -TERM {logstash_pid} +---- + +==== What Happens During a Controlled Shutdown? + When you attempt to shut down a running Logstash instance, Logstash performs several steps before it can safely shut down. It must: * Stop all input, filter and output plugins @@ -30,8 +62,8 @@ Logstash safely whenever possible. [[shutdown-stall-example]] ==== Stall Detection Example -In this example, slow filter execution prevents the pipeline from clean shutdown. By starting Logstash with the -`--pipeline.unsafe_shutdown` flag, quitting with *Ctrl+C* results in an eventual shutdown that loses 20 events. +In this example, slow filter execution prevents the pipeline from performing a clean shutdown. Because Logstash is +started with the `--pipeline.unsafe_shutdown` flag, the shutdown results in the loss of 20 events. ======== [source,shell]