Hello community,
I am trying parse my custom NGINX logs and in the kibana Debugger I can see parsing is correct but when I apply in the pipeline I an seeing _grokoparsefailure with parsed log. I am not sure why it's failing and where it is failing,
Here is the example log
`10.9.4.255 - - 26/Oct/2018:12:57:15 -0500 \"/mercurycard/selectize/match.tpl.html\" 200 338 \"https://www.mercurycards.com/mercurycard/\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36\" \"70.235.249.232, 198.143.57.57, 10.9.4.255\"`
Grok Pattern
`%{IPORHOST:[nginx][access][local_ip]} - %{DATA:[nginx][access][user_name]} %{HTTPDATE:[nginx][access][time]} \"%{GREEDYDATA:[nginx][access][url]}\" %{NUMBER:[nginx][access][response_code]} %{NUMBER:[nginx][access][body_sent][bytes]} \"%{DATA:[nginx][access][referrer]}\" \"%{DATA:[nginx][access][agent]}\" \"%{IPORHOST:[nginx][access][remote_ip]}, %{IPORHOST:[nginx][access][elb_ip]}, %{IPORHOST:[nginx][access][local_ip1]}\"`
Jason Result:
`{
logstash | "@version" => "1",
logstash | "tags" => [
logstash | [0] "webapp-prod",
logstash | [1] "_grokparsefailure"
logstash | ],
logstash | "fileset" => {
logstash | "module" => "nginx",
logstash | "name" => "access"
logstash | },
logstash | "message" => "10.9.4.255 - - 26/Oct/2018:12:57:15 -0500 \"/mercurycard/selectize/match.tpl.html\" 200 338 \"https://www.mercurycards.com/mercurycard/\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36\" \"70.235.249.232, 198.143.57.57, 10.9.4.255\"",
logstash | "beat" => {
logstash | "hostname" => "ip-10-9-0-36",
logstash | "ip" => "10.9.0.36",
logstash | "version" => "6.4.2",
logstash | "name" => "ip-10-9-0-36"
logstash | },
logstash | "source" => "/var/log/nginx/access.log",
logstash | "input" => {
logstash | "type" => "log"
logstash | },
logstash | "nginx" => {
logstash | "access" => {
logstash | "remote_ip" => "70.235.249.232",
logstash | "body_sent" => {
logstash | "bytes" => "338"
logstash | },
logstash | "response_code" => "200",
logstash | "user_name" => "-",
logstash | "url" => "/mercurycard/selectize/match.tpl.html",
logstash | "user_agent" => {
logstash | "minor" => "0",
logstash | "build" => "",
logstash | "os_name" => "Windows 10",
logstash | "patch" => "3497",
logstash | "major" => "69",
logstash | "name" => "Chrome",
logstash | "os" => "Windows 10",
logstash | "device" => "Other"
logstash | },
logstash | "geoip" => {
logstash | "ip" => "70.235.249.232",
logstash | "country_code2" => "US",
logstash | "location" => {
logstash | "lat" => 37.751,
logstash | "lon" => -97.822
logstash | },
logstash | "latitude" => 37.751,
logstash | "country_name" => "United States",
logstash | "longitude" => -97.822,
logstash | "continent_code" => "NA",
logstash | "country_code3" => "US"
logstash | },
logstash | "elb_ip" => "198.143.57.57",
logstash | "local_ip" => "10.9.4.255",
logstash | "local_ip1" => "10.9.4.255",
logstash | "referrer" => "https://www.mercurycards.com/mercurycard/"
logstash | }
logstash | },
logstash | "read_timestamp" => "2018-10-26T17:57:15.130Z",
logstash | "offset" => 38642780,
logstash | "@timestamp" => 2018-10-26T17:57:15.000Z,
logstash | "prospector" => {
logstash | "type" => "log"
logstash | }
logstash | }`
I am using Default Filebeat template