Class: SplunkOutput

Inherits:
Fluent::Output
  • Object
show all
Defined in:
lib/fluent/plugin/out_splunk.rb

Instance Method Summary collapse

Instance Method Details

#configure(conf) ⇒ Object



7
8
9
# File 'lib/fluent/plugin/out_splunk.rb', line 7

def configure(conf)
  super
end

#emit(tag, es, chain) ⇒ Object



21
22
23
24
25
26
# File 'lib/fluent/plugin/out_splunk.rb', line 21

def emit(tag, es, chain)
  chain.next
  es.each {|time,record|
    @splunk_connection.puts  "#{time}: #{record}\n" 
  }
end

#shutdownObject



16
17
18
19
# File 'lib/fluent/plugin/out_splunk.rb', line 16

def shutdown
  super
  @splunk_connection.close 
end

#startObject



11
12
13
14
# File 'lib/fluent/plugin/out_splunk.rb', line 11

def start
  super
  @splunk_connection = TCPSocket.open(@host, @port)
end