Hi,
I tried as you mentioned,but i am facing grokpattern error, its not taking up custom patterns ,
Code:
input {
file {
path => "D:\logstash-6.2.4\bin\webe.log"
start_position => "beginning"
}
}
filter {
grok {
patterns_dir => ["D:\logstash-6.2.4\bin\custom_pattern"]
match => { "message" => "%{DATE:timestamp}%{SPACE}%{LOGLEVEL:loglevel}%{SPACE}%{LINENUMBER:file}%{SPACE} %{WORD}.%{WORD}%{SPACE}%{DATA:account}=%{NUMBER:acct_nr}%{SPACE}%{DATA:errordet}=%{GREEDYDATA:log}" }
}
}
output {
elasticsearch {
hosts => ["localhost:9200"]
index => "logs_parameter_index"
}
stdout { codec => rubydebug }
}
Error:
[2018-06-04T11:36:17,780][ERROR][logstash.pipeline ] Error registering plugin {:pipeline_id=>"main", :plugin=>"#<LogStash::FilterDelegator:0x39d6bae9 @metric_events_out=org.jruby.proxy.org.logstash.instrument.metrics.counter.LongCounter$Proxy2 - name: out value:0, @metric_events_in=org.jruby.proxy.org.logstash.instrument.metrics.counter.LongCounter$Proxy2 - name: in value:0, @metric_events_time=org.jruby.proxy.org.logstash.instrument.metrics.counter.LongCounter$Proxy2 - name: duration_in_millis value:0, @id="9f6b1fb0721974fe26ef58f6626709fdb2832c6b5f081a6fcac6ec7e8b0e329b", @klass=LogStash::Filters::Grok, @metric_events=#<LogStash::Instrument::NamespacedMetric:0x2c183e59 @metric=#<LogStash::Instrument::Metric:0x23a3ad60 @collector=#<LogStash::Instrument::Collector:0x148ca8e7 @agent=nil, @metric_store=#<LogStash::Instrument::MetricStore:0x1881596d @store=#<Concurrent:0x00000000000fb4 entries=3 default_proc=nil>, @structured_lookup_mutex=#Mutex:0x3a4a6fa6, @fast_lookup=#<Concurrent:0x00000000000fb8 entries=63 default_proc=nil>>>>, @namespace_name=[:stats, :pipelines, :main, :plugins, :filters, :"9f6b1fb0721974fe26ef58f6626709fdb2832c6b5f081a6fcac6ec7e8b0e329b", :events]>, @filter=<LogStash::Filters::Grok patterns_dir=>["D:\\avoN\\logstash-6.2.4\\bin\\custom_pattern"], match=>{"message"=>"^%{AVONDATE:timestamp}%{SPACE}%{LOGLEVEL:loglevel}%{SPACE}%{LINENUMBER:file}%{SPACE} %{WORD}.%{WORD}%{SPACE}%{DATA:account}=%{NUMBER:acct_nr}%{SPACE}%{DATA:errordet}=%{GREEDYDATA:log}"}, id=>"9f6b1fb0721974fe26ef58f6626709fdb2832c6b5f081a6fcac6ec7e8b0e329b", enable_metric=>true, periodic_flush=>false, patterns_files_glob=>"*", break_on_match=>true, named_captures_only=>true, keep_empty_captures=>false, tag_on_failure=>["_grokparsefailure"], timeout_millis=>30000, tag_on_timeout=>"_groktimeout">>", :error=>"pattern %{DATE:timestamp} not defined", :thread=>"#<Thread:0x6f6570b5 run>"}
[2018-06-04T11:36:17,795][ERROR][logstash.pipeline ] Pipeline aborted due to error {:pipeline_id=>"main", :exception=>#<Grok::PatternError: pattern %{AVONDATE:timestamp} not defined>, :backtrace=>["D:/avoN/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/jls-grok-0.11.4/lib/grok-pure.rb:123:in block in compile'", "org/jruby/RubyKernel.java:1292:in
loop'", "D:/avoN/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/jls-grok-0.11.4/lib/grok-pure.rb:93:in compile'", "D:/avoN/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/logstash-filter-grok-4.0.3/lib/logstash/filters/grok.rb:281:in
block in register'", "org/jruby/RubyArray.java:1734:in each'", "D:/avoN/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/logstash-filter-grok-4.0.3/lib/logstash/filters/grok.rb:275:in
block in register'", "org/jruby/RubyHash.java:1343:in each'", "D:/avoN/logstash-6.2.4/vendor/bundle/jruby/2.3.0/gems/logstash-filter-grok-4.0.3/lib/logstash/filters/grok.rb:270:in
register'", "D:/avoN/logstash-6.2.4/logstash-core/lib/logstash/pipeline.rb:342:in register_plugin'", "D:/avoN/logstash-6.2.4/logstash-core/lib/logstash/pipeline.rb:353:in
block in register_plugins'", "org/jruby/RubyArray.java:1734:in each'", "D:/avoN/logstash-6.2.4/logstash-core/lib/logstash/pipeline.rb:353:in
register_plugins'", "D:/avoN/logstash-6.2.4/logstash-core/lib/logstash/pipeline.rb:731:in maybe_setup_out_plugins'", "D:/avoN/logstash-6.2.4/logstash-core/lib/logstash/pipeline.rb:363:in
start_workers'", "D:/avoN/logstash-6.2.4/logstash-core/lib/logstash/pipeline.rb:290:in run'", "D:/avoN/logstash-6.2.4/logstash-core/lib/logstash/pipeline.rb:250:in
block in start'"], :thread=>"#<Thread:0x6f6570b5 run>"}
[2018-06-04T11:36:17,842][ERROR][logstash.agent ] Failed to execute action {:id=>:main, :action_type=>LogStash::ConvergeResult::FailedAction, :message=>"Could not execute action: LogStash::PipelineAction::Create/pipeline_id:main, action_result: false", :backtrace=>nil}