Skip to content

Instantly share code, notes, and snippets.

@johncarroll
Last active August 29, 2015 14:22
Show Gist options
  • Save johncarroll/0b7c6edd63107cf03e4f to your computer and use it in GitHub Desktop.
Save johncarroll/0b7c6edd63107cf03e4f to your computer and use it in GitHub Desktop.
Logstash s3
input {
s3 {
bucket => 'bucketname'
region => 'eu-west-1'
delete => true
type => 'elb'
}
}
filter {
grok {
match => {"message" => [
"%{TIMESTAMP_ISO8601:time} %{NOTSPACE:elb} %{IP:sourceip}:%{NUMBER:sourceport} %{IP:backendip}:%{NUMBER:backendport} (?:-|%{NUMBER:request_processing_time:float}) %{NUMBER:backend_processing_time:float} %{NUMBER:response_processing_time:float} (?:-|%{NUMBER:elb_status_code}) (?:-|%{NUMBER:backend_status_code}) %{NUMBER:received_bytes:int} %{NUMBER:sent_bytes:int} \"(?:-|%{NOTSPACE:request_type}) (?:-|%{NOTSPACE:request_uri}) (?:-|HTTP/%{NUMBER:httpversion}) ?\" ?%{GREEDYDATA:additional_info}?"
]}
}
date {
match => [ "time", "ISO8601"]
remove_field => ['time']
}
}
output {
elasticsearch { host => localhost }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment