Skip to content

Instantly share code, notes, and snippets.

@unreal4u
unreal4u / 50-httpd-php.conf
Last active February 19, 2022 12:00
Filter for logstash for access and error logs generated by apache2.(2|4) and php7
filter {
# Analyze access log
if [fields][type] == "apache-access" {
# First part: get every common message
grok {
match => { "message" => "^%{IP:[apache2][access][remote_ip]} %{USER:ident} %{USER:auth} \[%{HTTPDATE:timestamp}\] " }
overwrite => "message"
}
# Get the specifics