Getting exception: _grokparsefailure, while parsing customized Apache logs through Grok filter. It works perfectly fine with Grok debugger.
Example of customized Apache log:
quartz.texas.st.com:10001 10.10.10.10 - - [16/Jul/2018:17:13:48 -0700] + "GET /notification/Response/validate HTTP/1.1" 405 18 TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 13849 0
quartz.texas.st.com:10101 10.10.10.10 - - [18/Jul/2018:00:00:20 -0700] + "POST /notification/request/validate HTTP/1.1" 200 430 TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 1187025 1
logstash-apache.conf
input {
beats {
port => 5044
}
}
filter {
if [type] == "log" {
grok {
match => [ "message" , "%{NOTSPACE:VirtualHost} %{HOSTNAME:client_ip} %{USER:user} %{USER:auth} [%{HTTPDATE:apache_timestamp}] %{NOTSPACE:connection_status} "%{WORD:method} /%{NOTSPACE:request_page} HTTP/%{NUMBER:http_version}" %{NUMBER:server_response} %{NUMBER:size_of_response} %{NOTSPACE:protocol} %{NOTSPACE:ssl_cipher} %{NUMBER:time_taken_microsec} %{NUMBER:time_taken_sec} " ]
}
}
}
output {
elasticsearch {
hosts => "http://10.10.10.10:9200"
index => "qc_apache"
}
stdout { codec => rubydebug }
}