Class: LogStash::Codecs::Influxdb
- Inherits:
-
Base
- Object
- Base
- LogStash::Codecs::Influxdb
- Defined in:
- lib/logstash/codecs/influxdb.rb
Overview
Add any asciidoc formatted documentation here
Instance Method Summary collapse
Instance Method Details
#decode(data) ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/logstash/codecs/influxdb.rb', line 29 def decode(data) @lines.decode(data) do |line| # replace = { "message" => line.get("message").to_s + @append } # yield LogStash::Event.new(replace) yield LogStash::Event.new(InfluxParser.parse_point(line.get("message"))) end end |
#encode(event) {|event| ... } ⇒ Object
38 39 40 41 42 |
# File 'lib/logstash/codecs/influxdb.rb', line 38 def encode(event) # @on_event.call(event, event.get("message").to_s + @append + NL) # there is no encode (maybe some day) yield event end |
#register ⇒ Object
23 24 25 26 |
# File 'lib/logstash/codecs/influxdb.rb', line 23 def register @lines = LogStash::Codecs::Line.new @lines.charset = "UTF-8" end |