-
Notifications
You must be signed in to change notification settings - Fork 151
Closed
Description
Hi all,
I make a config for logstash ,
I want if the logs match logtype==request and env==prd , it will save to Bucket 1
If the logstash logtype==request and env==stg , i will save to Bucket2.
However, all logs are save on Bucket 1.
In the beginning , I think there is something wrong with my configure or logstash condition didn't work properly.
So I tried to remove configure which save logs on Bucket2 to check the conditional logstash.
However, it worked correctly.
That's why I think the logstash output-s3 don't allow to save logs on many buckets.
output {
if [logtype] == "request" and [env] == "prd" {
s3 {
access_key_id => "XXX"
secret_access_key => "XXX"
bucket => "XXX1"
endpoint_region => "us-east-1"
time_file => 1
}
}
if [logtype] == "request" and [env] == "stg" {
s3 {
access_key_id => "XXX"
secret_access_key => "XXX"
bucket => "XXX2"
endpoint_region => "us-east-1"
time_file => 1
}
}
}