Created
November 26, 2014 16:35
-
-
Save zouzias/499b043db2775021ebbb to your computer and use it in GitHub Desktop.
Apache Tomcat Logstash Filter
This file contains hidden or 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
# Based on http://spredzy.wordpress.com/2013/03/02/monitor-your-cluster-of-tomcat-applications-with-logstash-and-kibana/ | |
# Changed URIPARAMS with GREEDYDATA. URIPARAMS has problem with POST (i.e., no url parameters) | |
filter { | |
grok { | |
type => "access-log" | |
pattern => "%{IP:client} \- \- \[%{DATA:datestamp}\] \"%{WORD:method} %{URIPATH:uri_path}%{GREEDYDATA:params} %{DATA:protocol}\" %{NUMBER:code} %{NUMBER:bytes}" | |
} | |
kv { | |
type => "access-log" | |
fields => ["params"] | |
field_split=> "&?" | |
} | |
urldecode { | |
type => "access-log" | |
all_fields => true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment