Wow ok I missed that, thank you. I found another error in my conf file, in the grok filter. The syntax with :
match => {
"message", "xxx",
"message", "xxx"
}
was not correct. I replaced it by :
grok {
match => {
"message" => ["%{DATESTAMP:m_timestamp} %{LOGLEVEL:m_level} - %{DATA:m_msg} | %{DATA:m_origin}(%{DATA:m_file}:%{INT:m_line:int})",
"\s+At %{DATA:m_origin}(%{DATA:m_file}:%{INT:m_line:int}) - %{DATA:m_msg}"]
}
}
I also modified the multilines part that was incorrect since it was trying to use the plugin instead of the codec. Here's my conf file :
input {
file {
path => ["C:xxx/xxx.log"]
start_position => "beginning"
sincedb_path => "NUL"
codec => plain {
charset => "ISO-8859-1"
}
codec => multiline {
pattern => "^%{DATESTAMP} "
negate => true
what => "previous"
}
}
}
filter {
grok {
match => {
"message" => ["%{DATESTAMP:m_timestamp} %{LOGLEVEL:m_level} - %{DATA:m_msg} \| %{DATA:m_origin}\(%{DATA:m_file}:%{INT:m_line:int}\)",
"\s+At %{DATA:m_origin}\(%{DATA:m_file}:%{INT:m_line:int}\) - %{DATA:m_msg}"]
}
}
date {
match => [ "m_timestamp" , "dd-MM-yyyy HH:mm:ss" ]
}
}
output {
elasticsearch {
hosts => ["http://localhost:9200"]
index => "test6"
document_type => "mytype6"
}
stdout { codec => rubydebug }
}
Still I get an error that is difficult to read, no idea for this one :
[ERROR][logstash.agent ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"NoMethodError", :message=>"undefined method '+' for #Java::OrgLogstashConfigIrImperative::PluginStatement:0x6ad173d2", :backtrace=>["C:/logstash-6.6.1/logstash-core/lib/logstash/compiler/lscl.rb:118:in block in expr_attributes'", "org/jruby/RubyArray.java:1734:in
each'", "org/jruby/RubyEnumerable.java:936:in inject'", "C:/logstash-6.6.1/logstash-core/lib/logstash/compiler/lscl.rb:97:in
expr_attributes'", "C:/logstash-6.6.1/logstash-core/lib/logstash/compiler/lscl.rb:75:in expr'", "org/jruby/RubyArray.java:2486:in
map'", "C:/logstash-6.6.1/logstash-core/lib/logstash/compiler/lscl.rb:68:in expr'", "C:/logstash-6.6.1/logstash-core/lib/logstash/compiler/lscl.rb:47:in
block in compile'", "org/jruby/RubyArray.java:1734:in each'", "C:/logstash-6.6.1/logstash-core/lib/logstash/compiler/lscl.rb:45:in
compile'", "C:/logstash-6.6.1/logstash-core/lib/logstash/compiler.rb:45:in compile_imperative'", "C:/logstash-6.6.1/logstash-core/lib/logstash/compiler.rb:49:in
compile_graph'", "C:/logstash-6.6.1/logstash-core/lib/logstash/compiler.rb:11:in block in compile_sources'", "org/jruby/RubyArray.java:2486:in
map'", "C:/logstash-6.6.1/logstash-core/lib/logstash/compiler.rb:10:in compile_sources'", "org/logstash/execution/AbstractPipelineExt.java:149:in
initialize'", "C:/logstash-6.6.1/logstash-core/lib/logstash/pipeline.rb:22:in initialize'", "C:/logstash-6.6.1/logstash-core/lib/logstash/pipeline.rb:90:in
initialize'", "C:/logstash-6.6.1/logstash-core/lib/logstash/pipeline_action/create.rb:43:in block in execute'", "C:/logstash-6.6.1/logstash-core/lib/logstash/agent.rb:94:in
block in exclusive'", "org/jruby/ext/thread/Mutex.java:148:in synchronize'", "C:/logstash-6.6.1/logstash-core/lib/logstash/agent.rb:94:in
exclusive'", "C:/logstash-6.6.1/logstash-core/lib/logstash/pipeline_action/create.rb:39:in execute'", "C:/logstash-6.6.1/logstash-core/lib/logstash/agent.rb:327:in
block in converge_state'"]}