Last active
October 31, 2017 00:35
-
-
Save fefore/c21753dc26ea0182ea8d590fc83e1e65 to your computer and use it in GitHub Desktop.
[LOGSTASH] Grok Pattern for log4net 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
filter { | |
if [type] == "log4net" { | |
grok { | |
match => [ "message", "%{TIMESTAMP_ISO8601:timestamp} \[%{NUMBER:threadid}\] %{WORD:level}\s*%{DATA:class} \[%{DATA:NDC}\]\s+-\s+%{GREEDYDATA:message}" ] | |
} | |
mutate { | |
update => { | |
"type" => "log4net-log" | |
} | |
remove_field => [ | |
"[beat][hostname]", | |
"[beat][name]", | |
"[beat][version]" | |
] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment