I looked through here and there, but could not find a working permit. I am trying to use Grok Filter inside a Logstash configuration file to filter the Apache-Access log file. The log message is as follows: {"message":"00.00.0.000 - - [dd/mm/YYYY:hh:mm:ii +0000] \"GET /index.html HTTP/1.1\" 200 00"}.
At this point, I could only filter the client ip using grok {match => ["message", "% {IP: client_ip}"]}.
I want to filter:
- The GET method, - requested page (index.html), - HTTP/1.1\, - server response 200 - the last number 00 after 200 inside the message body
Please note: none of them work for me:
- grok {match => {"message" => "% {COMBINEDAPACHELOG}"}} or
- grok {match => ["message", "% {COMBINEDAPACHELOG}"]}
source share