Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Logstash configuration file
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
You can’t perform that action at this time.