How to add AWS ELB access logs to logstash with S3 input

amazon s3amazon-elbelklogstash

I'm using an ELK stack for server monitoring. My application's access logs which are from AWS ELB are stored in AWS S3. I am trying to add them to logstash with the following input:

input {
  s3 {
    access_key_id => "my_id"
    secret_access_key => "my_key"
    bucket => "my_bucket"
    region => "region"
    prefix => "AWSLogs/828557649675/elasticloadbalancing/eu-west-1/**/**/**/*.log"
    type => "elb"
  }
}

But nothing is added to logstash, what am I doing wrong? I there another way to add them to logstash?
The filter and output parts seems OK so I don't post them.

Note: I am using logstash 2.1 version

Best Answer

Seems like the prefix should be, as the plugin does not support globs (*) :

 prefix => "AWSLogs/828557649675/elasticloadbalancing/eu-west-1/"

Full example:

input {
  s3 {
    access_key_id => "my_id"
    secret_access_key => "my_key"
    bucket => "my_bucket"
    region => "region"
    prefix => "AWSLogs/828557649675/elasticloadbalancing/eu-west-1/"
  }
}
Related Topic