lukewaite / logstash-input-cloudwatch-logs

Input plugin for Logstash to stream events from CloudWatch Logs
Other
142 stars 74 forks source link

Log_group_prefix not working #71

Open sunilmchaudhari opened 5 years ago

sunilmchaudhari commented 5 years ago

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?

asimarra commented 5 years ago

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.