logstash-input-cloudwatch-logs
logstash-input-cloudwatch-logs copied to clipboard
Log_group_prefix not working
Hi, I am trying to read all the log_groups starts with "abcd-api-property-"
###########Configuration Working####### cloudwatch_logs { type=>"cloudwatch_logs"
add_field => { "log_metric" => "ec2"
"log_module" => "property" }
log_group => "abcd-api-property-uat-76-api"
interval => 30
region => "ap-southeast-1"
sincedb_path => "/myPath/logstash/6.3.1/aws/sincedb"
aws_credentials_file => '/myPath/config/aws-key.yaml'
}
############### Not Working COnfiguration #################
cloudwatch_logs {
type=>"cloudwatch_logs"
add_field => { "log_metric2" => "ec2"
"log_module2" => "property" }
log_group_prefix => true
log_group => "abcd-api-property-"
interval => 30
region => "ap-southeast-1"
sincedb_path => "/myPath/logstash/6.3.1/aws/sincedb"
aws_credentials_file => '/myPath/config/aws-key.yaml'
}
Above config gives AccessDenied Exception.
Any suggestion?
Hi friend, tried with:
input { cloudwatch_logs { log_group => "/aws/lambda/abcd-api-property-*" log_group_prefix => true } }
or
input { cloudwatch_logs { log_group => "/aws/lambda/abcd-api-property-" log_group_prefix => true } }
You tell me how are you.