Skip to content

Instantly share code, notes, and snippets.

@unicolet
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save unicolet/0468aff837aacc6f9a91 to your computer and use it in GitHub Desktop.
Save unicolet/0468aff837aacc6f9a91 to your computer and use it in GitHub Desktop.
logstash conf for apache log files
input {
file {
type => "accesslog"
path => [ "/var/log/access_logs/access_log" ]
}
}
filter {
grok {
match => { "message" => "%{EXTENDEDAPACHELOG}" }
}
date {
match => [ "timestamp" , "MMM dd HH:mm:ss", "MMM d HH:mm:ss" ]
}
}
output {
elasticsearch {
host => localhost
template => "/opt/monitoring/logstash-1.4.2/el_template.json"
template_overwrite => true
}
#stdout { codec => rubydebug }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment