Class: LogStash::Inputs::Example
- Inherits:
-
Base
- Object
- Base
- LogStash::Inputs::Example
- Defined in:
- lib/logstash/inputs/example.rb
Overview
Generate a repeating message.
This plugin is intented only as an example.
Instance Method Summary collapse
- #register ⇒ Object
-
#run(queue) ⇒ Object
def register.
Instance Method Details
#register ⇒ Object
26 27 28 |
# File 'lib/logstash/inputs/example.rb', line 26 def register @host = Socket.gethostname end |
#run(queue) ⇒ Object
def register
30 31 32 33 34 35 36 |
# File 'lib/logstash/inputs/example.rb', line 30 def run(queue) Stud.interval(@interval) do event = LogStash::Event.new("message" => , "host" => @host) decorate(event) queue << event end # loop end |