mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
parent
6098a4f0cd
commit
bb5cc0173f
2 changed files with 14 additions and 5 deletions
|
@ -117,8 +117,14 @@ class LogStash::Agent < Clamp::Command
|
|||
end
|
||||
|
||||
# Make SIGINT shutdown the pipeline.
|
||||
trap_id = Stud::trap("INT") do
|
||||
@logger.warn(I18n.t("logstash.agent.interrupted"))
|
||||
sigint_id = Stud::trap("INT") do
|
||||
@logger.warn(I18n.t("logstash.agent.sigint"))
|
||||
pipeline.shutdown
|
||||
end
|
||||
|
||||
# Make SIGTERM shutdown the pipeline.
|
||||
sigterm_id = Stud::trap("TERM") do
|
||||
@logger.warn(I18n.t("logstash.agent.sigterm"))
|
||||
pipeline.shutdown
|
||||
end
|
||||
|
||||
|
@ -154,7 +160,8 @@ class LogStash::Agent < Clamp::Command
|
|||
return 1
|
||||
ensure
|
||||
@log_fd.close if @log_fd
|
||||
Stud::untrap("INT", trap_id) unless trap_id.nil?
|
||||
Stud::untrap("INT", sigint_id) unless sigint_id.nil?
|
||||
Stud::untrap("TERM", sigterm_id) unless sigterm_id.nil?
|
||||
end # def execute
|
||||
|
||||
def show_version
|
||||
|
|
|
@ -57,8 +57,10 @@ en:
|
|||
the '-f yourlogstash.conf' flag?
|
||||
error: >-
|
||||
Error: %{error}
|
||||
interrupted: >-
|
||||
Interrupt received. Shutting down the pipeline.
|
||||
sigint: >-
|
||||
SIGINT received. Shutting down the pipeline.
|
||||
sigterm: >-
|
||||
SIGTERM received. Shutting down the pipeline.
|
||||
configtest-flag-information: |-
|
||||
You may be interested in the '--configtest' flag which you can
|
||||
use to validate logstash's configuration before you choose
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue