Class: LogStash::Filters::Jsonvalidate
- Inherits:
-
Base
- Object
- Base
- LogStash::Filters::Jsonvalidate
- Defined in:
- lib/logstash/filters/jsonvalidate.rb
Overview
This filter requires a set of intput fields that will be joined in csv format and saved into the specified csv output field
Instance Method Summary collapse
Instance Method Details
#filter(event) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/logstash/filters/jsonvalidate.rb', line 36 def filter(event) @logger.debug? and @logger.debug("Running jsonvalidate filter", :event => event) @test_fields.each do |field| if !valid_json?(event[field]) event["tags"] << @failed_test_tag unless event["tags"].include?(@failed_test_tag) end end filter_matched(event) @logger.debug? and @logger.debug("Event now: ", :event => event) end |
#register ⇒ Object
31 32 33 |
# File 'lib/logstash/filters/jsonvalidate.rb', line 31 def register # Add instance variables end |