Open aydasraf opened 1 year ago
sorry we missed this one - i opened the following issue in the beats repo where this data collection code is implemented https://github.com/elastic/beats/issues/36642.
May I check when can this PR be done? waiting for this feature.. @tommyers-elastic
Stack Info ES + ESAg: 8.8.0 AWS Integration: 1.42.0
Summary We are using the AWS integration for various AWS services, we mainly use the
collect logs from CloudWatch
option. This has been working so far so good as long as the cloudwatch log group is in the same account as the elastic agent.Recently we moved to the CloudWatch cross-account observability which allows us to have centralised monitoring account where we can access the cloudwatch logs and metrics from all other accounts. We started centralising our elastic agent installation as well. Sadly we discovered that the current implementation the integration use to query cloudwatch logs is not optimal as it always uses the
logGroupName
to request data using theFilterLogEvents
API whether you useLog Group ARN
orLog Group Name
which not ideal , as it this approach assumes that the cloudwatch log group is hosted in the same account - preventing any cross account calls.This is the error we get when providing
Log Group ARN
for cloudwatch log that is in different account:This is the payload we see in cloudtrail:
This should be as follow instead (since
Log Group ARN
was supplied)What needs to be done
Log Group ARN
is provided in the integration inputs, then the call must use the provided value and send a payload with logGroupIdentifier this will allow cross account access.logGroupName
the current logic stands and we can use the provided value and send the payload that contains logGroupName