Class: LogStash::Filters::Influxdb

Inherits:
Base
  • Object
show all
Defined in:
lib/logstash/filters/influxdb.rb

Instance Method Summary collapse

Instance Method Details

#filter(event) ⇒ Object



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/logstash/filters/influxdb.rb', line 22

def filter(event)
  
  point = InfluxParser.parse_point(event.get(@source),{
    :parse_types => @parse_types,
    :time_format => @time_format
  })

  if point
    event.set(@target, point)
  else
    event.set(@target, {'_influxparseerror' => true })
  end

  # filter_matched should go in the last line of our successful code
  filter_matched(event)
end

#registerObject



17
18
19
# File 'lib/logstash/filters/influxdb.rb', line 17

def register
  # Add instance variables
end