My logstash shuts down because of this error:
[2019-11-25T10:53:06,400][ERROR][logstash.agent ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message=>"Something is wrong with your configuration.", :backtrace=>["C:/ELK/logstash-7.1.1/logstash-core/lib/logstash/config/mixin.rb:86:in config_init'", "C:/ELK/logstash-7.1.1/logstash-core/lib/logstash/outputs/base.rb:60:in
initialize'", "org/logstash/config/ir/compiler/OutputStrategyExt.java:232:in initialize'", "org/logstash/config/ir/compiler/OutputDelegatorExt.java:48:in
initialize'", "org/logstash/config/ir/compiler/OutputDelegatorExt.java:30:in initialize'", "org/logstash/plugins/PluginFactoryExt.java:239:in
plugin'", "org/logstash/plugins/PluginFactoryExt.java:137:in buildOutput'", "org/logstash/execution/JavaBasePipelineExt.java:50:in
initialize'", "C:/ELK/logstash-7.1.1/logstash-core/lib/logstash/java_pipeline.rb:23:in initialize'", "C:/ELK/logstash-7.1.1/logstash-core/lib/logstash/pipeline_action/create.rb:36:in
execute'", "C:/ELK/logstash-7.1.1/logstash-core/lib/logstash/agent.rb:325:in `block in converge_state'"]}
Here is my config file. What am i doing wrong?
input {
file {
path => "C:/ELK/WITSML/WITSML_logs/rigcloud_witsml/two/RigCLOUD_WITSML_Store_ALL_log_two.log"
start_position => "beginning"
}
}
filter {
if [message] =~ "Begin Request" {
grok { match => {"message" => "%{TIMESTAMP_ISO8601} %{NOTSPACE:tracking_ID} %{NOTSPACE:thread_ID} %{WORD:log_level} %{NOTSPACE:method} - %{GREEDYDATA:witsml_begin_request}. URI: %{NOTSPACE:log_message}, Referrer: , UserHostAddress: %{IP:user_host_ip}, UserHostName: %{IP:user_host_name}, TotalBytes: %{NUMBER:WITSML_request_bytes}"}
}
}
if [message] =~ "End Request" {
grok { match => {"message" => "%{TIMESTAMP_ISO8601} %{NOTSPACE:tracking_ID} %{NOTSPACE:thread_ID} %{WORD:log_level} %{NOTSPACE:method} - %{GREEDYDATA:witsml_end_request}. URI: %{NOTSPACE:log_message}, Referrer: , UserHostAddress: %{IP:user_host_ip}, UserHostName: %{IP:user_host_name}, TotalBytes: %{NUMBER:request_bytes}, Elapsed Time: %{NUMBER:WITSML_elapsed_time}"}
}
}
if [message] =~ "apiURI" {
grok { match => {"message" => "%{TIMESTAMP_ISO8601} %{NOTSPACE:tracking_ID} %{NOTSPACE:thread_ID} %{WORD:log_level} %{NOTSPACE:method} -%{GREEDYDATA:api_request} %{NOTSPACE:log_message}, Username: %{USERNAME}, StatusCode: %{WORD:status_code}, Elapsed Time: %{NUMBER:api_elapsed_time}"}
}
grok { match => {"message" => "%{TIMESTAMP_ISO8601} %{NOTSPACE:tracking_ID} %{NOTSPACE:thread_ID} %{WORD:log_level} %{NOTSPACE:method} - Authentication Response for user: %{NOTSPACE:user_name} %{GREEDYDATA:api_request_no_elapsed_time}: http:%{GREEDYDATA:api_request_details}"}
}
grok { match => {"message" => "%{TIMESTAMP_ISO8601} %{NOTSPACE:tracking_ID} %{NOTSPACE:thread_ID} %{WORD:log_level} %{NOTSPACE:method} - Authorization Response for user: %{NOTSPACE:user_name}. %{GREEDYDATA:api_request} http:%{GREEDYDATA:api_request_details}, StatusCode: %{WORD:status_code}, Elapsed Time: %{NUMBER:api_elapsed_time}"}
}
grok { match => {"message" => "%{TIMESTAMP_ISO8601} %{NOTSPACE:tracking_ID} %{NOTSPACE:thread_ID} %{WORD:log_level} %{GREEDYDATA:method} - %{NOTSPACE:api_request_no_elapsed_time}: %{GREEDYDATA:api_query_string}"}
}
grok { match => {"message" => "%{TIMESTAMP_ISO8601} %{NOTSPACE:tracking_ID} %{NOTSPACE:thread_ID} %{WORD:log_level} %{GREEDYDATA:method} - %{NOTSPACE:api_request}: %{GREEDYDATA:api_query_string}, StatusCode: %{WORD:status_code}, Elapsed Time: %{NUMBER:api_elapsed_time}"}
}
grok { match => {"message" => "%{TIMESTAMP_ISO8601} %{NOTSPACE:tracking_ID} %{NOTSPACE:thread_ID} %{WORD:log_level} %{GREEDYDATA:method} - %{NOTSPACE:api_request_no_elapsed_time}: %{GREEDYDATA:api_query_string}, StatusCode: %{WORD:status_code}"}
}
grok { match => {"message" => "%{TIMESTAMP_ISO8601} %{NOTSPACE:tracking_ID} %{NOTSPACE:thread_ID} %{WORD:log_level} %{GREEDYDATA:method}. %{NOTSPACE:api_request}: http:%{GREEDYDATA:api_query_string}, Elapsed Time: %{NUMBER:api_elapsed_time}"}
}
}
}
output {
if "_grokparsefailure" in [tags] {
file {"path" => "C:/ELK/WITSML/WITSML_logs/rigcloud_witsml/two/api_grokparsefailure.txt"}
}
else {
elasticsearch {
hosts => ["localhost:9200"]
index => "witsml_api_twoo"
template => "C:/ELK/mytemplate.json"
}
}
}