Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clean way to stop Logstash

Tags:

logstash

Let's imagine that I have a Logstash instance running, but would like to stop it cleanly, to change it's configs for example.

How can I stop the Logstash instance, while ensuring that it finish sending the bulks to Elasticsearch? I don't want to loose any logs while stopping logstash.

like image 496
Heschoon Avatar asked Apr 20 '15 08:04

Heschoon


People also ask

What happens if logstash is down?

If Logstash fails or its buffer overflows, logged events are lost. If it crashes or is taken offline for maintenance, all queued events are lost.

How do I know if logstash is running?

Verify Service is Running The most basic thing to check is the status of the Logstash status: sudo service logstash status.


1 Answers

With Logstash 2.3:

Logstash keeps all events in main memory during processing. Logstash responds to a SIGTERM by attempting to halt inputs and waiting for pending events to finish processing before shutting down.

Source: https://www.elastic.co/guide/en/logstash/2.3/pipeline.html

like image 163
Maxime Avatar answered Sep 27 '22 18:09

Maxime