AWS CloudWatch metrics to OpenSearch
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 ?
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
@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 ?
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
How to read cross-account CloudWatch metrics programmatically?asked 13 days ago
No metrics in Amazon Translate and CloudWatch dashboardsasked 3 years ago
Doubt about cloudwatch metricsasked a month ago
How to rename Name in Namespace on Cloudwatch All MetricsAccepted Answerasked 2 months ago
Centralized logging - one region, perhaps one account (S3/VPC)asked 3 months ago
HTTP API metrics not showing in CloudWatch automatic dashboardasked 4 months ago
How to access metrics from CWAgent in CloudWatch console?asked 2 months ago
Segregate logs in Opensearch based on accountsasked 4 months ago
IP Metrics for SES dedicated IPs from Microsoft SNDS are missing in CloudWatchasked 3 months ago
AWS CloudWatch metrics to OpenSearchasked 2 months ago