-
-
Save alexanderilyin/53b5f17ab700706bdef4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filter { | |
if [type] == 'php-fpm-slow-log' { | |
# Drop empty lines | |
if [message] =~ /^\s*$/ { | |
drop { } | |
} | |
# Time prefix appears on each line | |
multiline { | |
pattern => "^(\[0x0|script_filename|$)" | |
what => "previous" | |
} | |
grok { | |
patterns_dir => "/etc/logstash/patterns/" | |
match => [ "message", "(?m)%{PHP_FPM_SLOW_LOG}" ] | |
} | |
date { | |
match => [ "timestamp" , "dd-MMM-yyyy HH:mm:ss" ] | |
target => "@timestamp" | |
remove_field => "timestamp" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment