A company is looking to centralize monitoring for its hybrid cloud environment, which includes applications running on AWS EC2 instances and on-premises servers. They need to collect operating system metrics (CPU, memory, disk I/O) and application-specific metrics from both environments, and visualize them on a unified dashboard. The solution should be scalable and leverage existing AWS monitoring capabilities as much as possible. Which approach provides the most integrated and scalable solution?
- AInstall the CloudWatch Agent on all EC2 instances and on-premises servers to send metrics to Amazon CloudWatch, and create custom CloudWatch Dashboards.
- BUse AWS Systems Manager Agent for EC2 instances and a custom script for on-premises servers to push metrics to Amazon Kinesis Data Firehose, then to CloudWatch.
- CSet up a self-managed ELK stack (Elasticsearch, Logstash, Kibana) on EC2 instances to collect and visualize metrics from both environments.
- DDeploy custom Prometheus exporters on all servers (EC2 and on-premises) and use Amazon Managed Service for Prometheus (AMP) with Amazon Managed Grafana (AMG) for visualization.
Show answer & explanationAnswer & explanation
Correct answer: A. Install the CloudWatch Agent on all EC2 instances and on-premises servers to send metrics to Amazon CloudWatch, and create custom CloudWatch Dashboards.
The CloudWatch Agent is designed to collect OS-level metrics and application metrics from both EC2 instances and on-premises servers, sending them directly to Amazon CloudWatch. This provides a unified data source for metrics across hybrid environments. CloudWatch Dashboards can then be used to visualize these metrics, leveraging existing AWS monitoring capabilities and offering a scalable, integrated solution without needing to manage additional open-source monitoring infrastructure.
Why the other options are wrong
- B. Using Kinesis Data Firehose as an intermediary for metrics adds unnecessary complexity and cost when the CloudWatch Agent can send metrics directly to CloudWatch, simplifying the ingestion pipeline.
- C. A self-managed ELK stack introduces significant operational overhead for deployment, scaling, and maintenance, which goes against leveraging existing AWS monitoring capabilities and seeking a scalable, integrated solution with minimal management.
- D. While AMP/AMG is a powerful solution for Prometheus metrics, deploying and managing Prometheus exporters on all servers and then configuring AMP/AMG adds more complexity and configuration overhead than simply using the CloudWatch Agent for direct metric ingestion into CloudWatch.
CloudWatch Agent (On-Premises)
A unified agent that can be installed on both EC2 instances and on-premises servers to collect system-level metrics (CPU, memory, disk), custom metrics, and log files, sending them to Amazon CloudWatch.
- Supports hybrid cloud environments (EC2 and on-premises).
- Collects OS, custom metrics, and logs.
- Simplifies metric and log collection into CloudWatch.
Memory trick: CloudWatch Agent Unifies All Metrics Everywhere.