Created
November 28, 2013 20:33
-
-
Save lanyonm/7697747 to your computer and use it in GitHub Desktop.
Logstash configuration file
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
input { | |
file { | |
type => "nginx-access" | |
path => ["/var/log/nginx/access.log"] | |
} | |
} | |
filter { | |
if [type] == "nginx-access" { | |
grok { | |
# https://github.com/logstash/logstash/tree/master/patterns/grok-patterns | |
match => { "message" => "%{COMBINEDAPACHELOG}" } | |
} | |
} | |
} | |
output { | |
statsd { | |
host => "localhost" | |
port => 8125 | |
increment => "%{host}.nginx.response.%{response}" | |
} | |
elasticsearch { | |
embedded => true | |
} | |
# will log debug to the stdout | |
#stdout { codec => rubydebug } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment