Add teardown to flush elasticsearch on agent shutdown

Prior to this, some events could be lost if logstash was shutdown.
This commit is contained in:
Jordan Sissel 2014-03-17 22:39:47 -07:00
parent 0f3dff2e1f
commit bbb4f72557

View file

@ -334,4 +334,8 @@ class LogStash::Outputs::ElasticSearch < LogStash::Outputs::Base
# retried.
end # def flush
def teardown
buffer_flush(:final => true)
end
end # class LogStash::Outputs::Elasticsearch