Load cloudwatch to logstash

Hi,
I use AWS ES and Logstash as an aggregator. I want to load Cloudwatch logs (that located in a different account, for example, account B) into Logstash (that located in account A)
i use Logstash-cloudwatch plugin but i don't know how to configure Cloudwatch log-group id in input section
https://www.elastic.co/guide/en/logstash/7.1/plugins-inputs-cloudwatch.html#plugins-inputs-cloudwatch-endpoint

i tried this syntax but not work when i use arn for cloudwatch-loggroup in another account

input {
   cloudwatch {
    namespace => "AWS/Logs"
    metrics => [ "IncomingBytes", "IncomingLogEvents"]
    filters => { "LogGroupName" => "arn:aws:logs:eu-west-1:acountid:log-group:/var/log/messages:*" }
    region => "eu-west-1"
    access_key_id => "..............."
    secret_access_key => ".........................."
  }
}

output {
  amazon_es {
    hosts => ["https://xxxxxxxxx:443"]
    region => "eu-west-1"
    aws_access_key_id => ".................."
    aws_secret_access_key => ".................."
  }
 stdout { codec => rubydebug }

how can i load the cloudwatch logs into logstash in different account?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.