Skip to content

Instantly share code, notes, and snippets.

@cphoover
Created March 20, 2015 18:32
Show Gist options
  • Save cphoover/c4d5d0e6e39a9f0121c4 to your computer and use it in GitHub Desktop.
Save cphoover/c4d5d0e6e39a9f0121c4 to your computer and use it in GitHub Desktop.
logs.conf
input {
tcp {
port => 8000
type => access_log
}
}
filter {
grok {
match => {
"message" => "%{IPORHOST:http_host} %{IPORHOST:client_ip} - \[%{HTTPDATE:timestamp}\] %{NUMBER:request_length} %{NUMBER:request_time} \"(?:%{WORD:http_verb} %{NOTSPACE:http_request}(?: HTTP/%{NUMBER:http_version})?|%{DATA:raw_http_request})\" %{NUMBER:status} %{NUMBER:bytes_sent} %{NUMBER:body_bytes_sent} %{QS:referer} %{QS:user_agent} %{QS:http_x_forwared_for}"
}
}
}
output {
stdout {
codec => rubydebug
}
elasticsearch {
host => localhost
cluster => charlies_cluster
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment