-
-
Save MichalBryxi/5626060 to your computer and use it in GitHub Desktop.
Logstash indexer config for parsing postfix logs
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
# We will focus only on how to parse the records | |
filter { | |
# Split postfix record to basic parts | |
grok { | |
type => 'postfix' | |
pattern => '%{SYSLOGBASE}' | |
named_captures_only => true | |
} | |
# Split by spaces, trim colons and brackets | |
kv { | |
type => 'postfix' | |
field_split => ' ' | |
trim => '<>,' | |
source => "@message" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment