logstash-input-cloudwatch-logs icon indicating copy to clipboard operation
logstash-input-cloudwatch-logs copied to clipboard

Log_group_prefix not working

Open sunilmchaudhari opened this issue 5 years ago • 1 comments

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?

sunilmchaudhari avatar Mar 22 '19 07:03 sunilmchaudhari

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.

asimarra avatar Apr 05 '19 16:04 asimarra