Overview of Amazon CloudWatch
Amazon CloudWatch serves as the central monitoring and observability service within AWS, designed to provide comprehensive insights into the health and performance of AWS resources and applications.
Amazon CloudWatch is a monitoring and observability platform designed to give insight into AWS architecture, identify potential issues, and collect system-level and application-level metrics. It extends monitoring capabilities beyond default metrics through the CloudWatch Agent, enabling the collection of custom metrics and logs from various IT infrastructure components. CloudWatch can create alarms to notify users when something goes wrong and uses logs to create dashboards and metrics. (source_page: 2, 1)
Amazon CloudWatch serves as the central monitoring and observability service within AWS, designed to provide comprehensive insights into the health and performance of AWS resources and applications.
Metrics are fundamental to CloudWatch, representing time-ordered sets of data points that quantify the performance and health of your resources and applications.
CloudWatch Alarms enable you to monitor metrics and automatically trigger actions when predefined thresholds are breached, ensuring proactive response to operational issues.
Amazon CloudWatch Events is a serverless event bus that provides a near real-time stream of system events, enabling automated responses to changes in your AWS resources.
The CloudWatch Agent is a software package designed to automatically collect system-level and application-specific metrics and logs from your IT infrastructure, extending Amazon CloudWatch's monitoring capabilities beyond default metrics.
The CloudWatch Agent is a software daemon that runs continuously on your servers, proactively collecting specified metrics and logs and sending them to Amazon CloudWatch for analysis and visualization.
This section outlines the steps for installing and configuring the CloudWatch Agent on a Linux EC2 instance to collect custom metrics and logs.
💡 To observe default metrics (CPU utilization, disk I/O, network traffic) and note the absence of memory usage and disk space availability.
💡 The agent requires appropriate permissions to send data to CloudWatch. For EC2 instances, assigning an Instance Role is the recommended approach.
💡 Outbound network access is necessary for the agent to communicate with CloudWatch.
💡 To demonstrate custom log monitoring.
💡 The wizard generates a JSON configuration file and saves it to the Systems Manager Parameter Store.
💡 The agent will start, fetching the configuration from the specified SSM Parameter Store path.
This section details the step-by-step installation and configuration of the Amazon CloudWatch agent on a Windows EC2 instance.
💡 The CloudWatch Agent requires appropriate permissions to communicate with AWS CloudWatch services.
💡 SSM Run Command provides a scalable solution for deploying and managing agents across multiple instances.
💡 The configuration wizard helps set up metrics and log collection, and stores the configuration in SSM Parameter Store.
💡 To activate the agent and begin collecting metrics and logs.
CloudWatch Logs is a fundamental AWS service for centralized log management, enabling monitoring, storage, and access to log files from various sources across your AWS environment.
This procedure outlines how to create a metric filter in CloudWatch Logs to identify specific patterns (e.g., 404 errors) and then set up an alarm based on that metric.
💡 To populate the log group with data that includes the pattern you intend to filter (e.g., 404 errors).
💡 To identify specific log patterns (e.g., 404 errors) from the log data.
💡 This pattern tells CloudWatch Logs how to interpret fields and filters for lines with 'status_code=404'.
[ip, id, user, timestamp, request, status_code=404, size]
💡 To send a notification when the number of 404 errors exceeds a predefined threshold.
CloudWatch extends its capabilities through seamless integration with numerous AWS services, enabling comprehensive monitoring, automation, and deeper insights across the AWS ecosystem.