Logstash: SIGHUP for Reloading New Config
Reload Logstash pipeline config without restarting the service — just send SIGHUP to the running process and watch the log confirm the reload.
1 min read
Sometimes, I need to reconfigure Logstash config.
Without restart the services, just send a SIGHUP to the running Logstash process.
$ pgrep -U logstash17913$ kill -SIGHUP 17913You can see on Logstash log, it just already reloads.
$ tail -f /var/log/logstash/logstash-plain.log[2021-05-09T16:35:12,815][WARN ][logstash.runner ] SIGHUP received.[2021-05-09T16:35:14,184][INFO ][logstash.pipelineaction.reload] Reloading pipeline {"pipeline.id"=>:main}[2021-05-09T16:35:17,143][INFO ][logstash.javapipeline ][main] Pipeline terminated {"pipeline.id"=>"main"}My new Logstash config has been successfuly reloaded and ready to process a bunch of log again.