How to get filename from AWS logs via logstash


(Subbu v) #1

Here is my logstah configuration file. can some one help on how to get the logfile name with AWS path.

input {
s3 {
access_key_id => "accesscode"
bucket => "bucket"
region => "location"
secret_access_key => "access key"
type => "location"
}
}
filter {

grok {
    match => { "message" => "%{COMBINEDAPACHELOG}"}
}
geoip {
    source => "clientip"
}
 seq {
    field => "seq"
  }
uuid {
target => "@uuid"

}

}

output {
elasticsearch {
index => "awslogs"
}
stdout {}
}


(Subbu v) #2

can someone help? i am able to index those files, but the issue is am not getting the file name and file path.


(system) #3