AWS CloudWatch metrics to OpenSearch

0

I'm working on Centralized Logging of my environnement AWS presented in this guide:https://docs.aws.amazon.com/solutions/latest/centralized-logging/overview.html

I'm using the same architecture as presented in AWS Doc.

I'm searching the possibility to send metrics from CloudWatch of each account to OpenSearch in centralized account. I was thinking of a Lambda function that retrieves each X minutes the data with get_metric_data ? I'm collecting the metrics with CloudWatch Agent

Is there an another method to do it ?

Thank you

2개 답변
0

CloudWatch Metric Streams is the easiest way to continually get metric data sent out of an account.

In your case, the simplest setup for that would be to send from your accounts to a central S3 bucket in your central account. From there you can have a Lambda that triggers whenever S3 files get uploaded to the bucket - read those S3 files and log the content to the Lambda's log output as EMF - a simple JSON format that creates metrics.

So pipeline is basically: remote account -> Metric Stream -> central account S3 bucket -> Lambda -> CW Logs as EMF -> CW Metrics

AWS
답변함 2년 전
  • @Amazon-CloudWatch-01 Thank you for your response ! As far as I know, it isn't possible to make a Metric Stream which streams to a S3 bucket in another account. Isn't it ?

0

There is an opensource projects which sends all CW metrics and logs for your Amazon OpenSearch Service deployment to a centralized opensearch. Have a look at this and see if this helps: https://github.com/aws-samples/amazon-opensearch-service-monitor

AWS
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인