mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -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
|
end
|
||||||
|
|
||||||
# Make SIGINT shutdown the pipeline.
|
# Make SIGINT shutdown the pipeline.
|
||||||
trap_id = Stud::trap("INT") do
|
sigint_id = Stud::trap("INT") do
|
||||||
@logger.warn(I18n.t("logstash.agent.interrupted"))
|
@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
|
pipeline.shutdown
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -154,7 +160,8 @@ class LogStash::Agent < Clamp::Command
|
||||||
return 1
|
return 1
|
||||||
ensure
|
ensure
|
||||||
@log_fd.close if @log_fd
|
@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
|
end # def execute
|
||||||
|
|
||||||
def show_version
|
def show_version
|
||||||
|
|
|
@ -57,8 +57,10 @@ en:
|
||||||
the '-f yourlogstash.conf' flag?
|
the '-f yourlogstash.conf' flag?
|
||||||
error: >-
|
error: >-
|
||||||
Error: %{error}
|
Error: %{error}
|
||||||
interrupted: >-
|
sigint: >-
|
||||||
Interrupt received. Shutting down the pipeline.
|
SIGINT received. Shutting down the pipeline.
|
||||||
|
sigterm: >-
|
||||||
|
SIGTERM received. Shutting down the pipeline.
|
||||||
configtest-flag-information: |-
|
configtest-flag-information: |-
|
||||||
You may be interested in the '--configtest' flag which you can
|
You may be interested in the '--configtest' flag which you can
|
||||||
use to validate logstash's configuration before you choose
|
use to validate logstash's configuration before you choose
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue