Effortlessly Visualize and Manage All Your AWS Metrics in One Place
Monitoring your AWS metrics across multiple accounts and namespaces can be challenging. By consolidating all your metrics into one place, you can streamline your monitoring process and gain valuable insights into your infrastructure. In this blog, we’ll walk through an end-to-end setup using a CloudFormation template that:
- Captures CloudWatch metrics using Metric Streams.
- Streams metrics to OpenObserve via Kinesis Firehose.
- Provides a fallback mechanism via an S3 backup.
Let’s get started!
Prerequisites
Before proceeding, ensure you have:
- AWS Access:
- Admin access to your AWS account.
- An S3 bucket ready for storing backups.
- OpenObserve:
- An endpoint configured to receive metrics via HTTP.
- Authentication tokens.
- CloudFormation Template: A YAML or JSON file ready for deployment (provided below).
Step 1: Understand the Architecture
Here’s how the system works:
- CloudWatch Metric Stream: Captures metrics across all namespaces (e.g., EC2, RDS, Lambda) and forwards them in near real-time to Kinesis Firehose.
- Kinesis Firehose Delivery Stream: delivers metrics to OpenObserve.
- S3 Backup: Stores metrics that fail to deliver for later analysis.
- IAM Roles: Grants secure permissions for each service to interact with the others.
This setup allows you to monitor metrics from multiple AWS accounts in a single location, streamlining the observability process.
Step 2: Deploy the CloudFormation Template
You can find the cloudformation script from our git repository.
Steps to Deploy
- Save the template as
metrics-stream-setup.yaml
. - Go to the AWS Management Console.
- Navigate to CloudFormation and click Create Stack.
- Upload the YAML file and follow the on-screen steps.
- Monitor the stack’s progress until it completes.
Step 3: Verify the Setup
- CloudWatch Metric Stream:
- Go to the CloudWatch console and check the Metric Stream status.
- Ensure it is active.
- Kinesis Firehose:
- Verify the delivery stream is active.
- Test by pushing sample metrics to the stream.
- S3 Backup:
- Check the specified bucket for failed deliveries (if any).
- OpenObserve:
- Log in and verify if metrics are being ingested.
Step 4: Benefits of This Setup
Without Centralized Monitoring | With Centralized Monitoring |
---|---|
Metrics are scattered across multiple accounts and services. | Metrics from all AWS accounts are consolidated in one place. |
Difficult to gain a unified view of infrastructure health. | Single-pane-of-glass visibility for all metrics. |
Manual effort required to aggregate data from different namespaces. | Automated collection of metrics across all namespaces (e.g., EC2, RDS, Lambda). |
Troubleshooting is time-consuming and fragmented. | Streamlined troubleshooting with centralized data. |
No backup mechanism for failed metric deliveries. | Reliable S3 backup for failed metrics. |
Step 5: Troubleshooting
If metrics are not appearing:
- Check IAM permissions for both Metric Stream and Kinesis Firehose roles.
- Verify the HTTP endpoint and authentication for OpenObserve.
- Look for errors in the S3 backup bucket.
Conclusion
By using this CloudFormation template and following these steps, you can easily centralize and streamline the monitoring of your AWS metrics. This setup ensures real-time observability across multiple AWS accounts and namespaces, providing a comprehensive view of your infrastructure. Simplify your AWS monitoring today!
Get Started with OpenObserve Today!
Sign up for a free trial of OpenObserve on our website. Check out our GitHub repository for self-hosting and contribution opportunities.