Created
July 10, 2015 16:40
-
-
Save ewr/50515f709fc00c3bdff8 to your computer and use it in GitHub Desktop.
KPCC Logstash Config for Podcasts
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
filter { | |
if [type] == "nginx" { | |
grok { | |
match => ["message", "%{NGINXACCESS}" ] | |
} | |
grok { | |
match => ["request","%{URIPATH:request_path}(?:%{URIPARAM:request_params})?"] | |
} | |
date { | |
match => [ "timestamp", "dd/MMM/yyyy:HH:mm:ss Z", "dd/MMM/yyyy:HH:mm:ss" ] | |
} | |
kv { | |
source => "request_params" | |
field_split => "&?" | |
prefix => "q" | |
} | |
geoip { | |
source => "clientip" | |
} | |
mutate { | |
gsub => [ | |
"agent", "(?:^\"|\"$)","", | |
"range_request", "(?:^\"|\"$)","" | |
] | |
} | |
} | |
} |
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
NGUSERNAME [a-zA-Z\.\@\-\+_%]+ | |
NGUSER %{NGUSERNAME} | |
NGINXACCESS %{IPORHOST:clientip} %{NGUSER:ident} %{NGUSER:auth} \[%{HTTPDATE:timestamp}\] "%{WORD:verb} %{URIPATHPARAM:request} HTTP/%{NUMBER:httpversion}" %{NUMBER:response} (?:%{NUMBER:bytes_sent:int}|-) (?:"(?:%{URI:referrer}|-)"|%{QS:referrer}) %{QS:agent}(?: %{NUMBER:request_time:float} (?:%{NUMBER:upstream_time:float}|\-) [\w\.](?: %{QS:range_request})?)? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment