Class: LogStash::Codecs::Base
- Inherits:
-
Object
- Object
- LogStash::Codecs::Base
- Defined in:
- lib/logstash/inputs/beats.rb
Overview
This input plugin enables Logstash to receive events from the www.elastic.co/products/beats[Elastic Beats] framework.
The following example shows how to configure Logstash to listen on port 5044 for incoming Beats connections and to index into Elasticsearch:
- source,ruby
input {
beats { port => 5044 }}
output
elasticsearch { hosts => "localhost:9200" manage_template => false index => "%{[@metadata][beat]-%+YYYY+YYYY.MM+YYYY.MM.dd" document_type => "%[@metadata][type]" }}
NOTE: The Beats shipper automatically sets the ‘type` field on the event. You cannot override this setting in the Logstash config. If you specify a setting for the <<plugins-inputs-beats-type,`type`>> config option in Logstash, it is ignored.
Instance Method Summary collapse
Instance Method Details
#accept(listener) ⇒ Object
49 50 51 52 53 |
# File 'lib/logstash/inputs/beats.rb', line 49 def accept(listener) decode(listener.data) do |event| listener.process_event(event) end end |
#auto_flush ⇒ Object
56 57 |
# File 'lib/logstash/inputs/beats.rb', line 56 def auto_flush(*) end |