Add info about shutting down Logstash

Fixes #6771
This commit is contained in:
DeDe Morton 2017-02-28 16:29:17 -08:00
parent ca6facc104
commit 8bc2ce1e64
2 changed files with 36 additions and 2 deletions

View file

@ -197,6 +197,8 @@ startup styles they use. This list is intended to be informative, not exhaustiv
| CentOS (and RHEL) 6 | <<running-logstash-upstart,upstart>> | | CentOS (and RHEL) 6 | <<running-logstash-upstart,upstart>> |
|======================================================================= |=======================================================================
For info about shutting down Logstash safely, see <<shutdown>>.
[[running-logstash-systemd]] [[running-logstash-systemd]]
==== Running Logstash by Using Systemd ==== Running Logstash by Using Systemd

View file

@ -1,6 +1,38 @@
[[shutdown]] [[shutdown]]
=== Shutting Down Logstash === 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: 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 * Stop all input, filter and output plugins
@ -30,8 +62,8 @@ Logstash safely whenever possible.
[[shutdown-stall-example]] [[shutdown-stall-example]]
==== Stall Detection Example ==== Stall Detection Example
In this example, slow filter execution prevents the pipeline from clean shutdown. By starting Logstash with the In this example, slow filter execution prevents the pipeline from performing a clean shutdown. Because Logstash is
`--pipeline.unsafe_shutdown` flag, quitting with *Ctrl+C* results in an eventual shutdown that loses 20 events. started with the `--pipeline.unsafe_shutdown` flag, the shutdown results in the loss of 20 events.
======== ========
[source,shell] [source,shell]