Amazon CloudWatch is a monitoring and observability service built for DevOps engineers, developers, site reliability engineers (SREs), and IT managers. CloudWatch provides us with data and actionable insights to monitor your applications, respond to system-wide performance changes, optimize resource utilization, and get a unified view of operational health.
Benefits of using AWS CloudWatch:
- Observability on single platform across applications and infrastructure.
- Get Operational Visibility and insight.
- Easiest way to collect matrix.
- Derive actionable insight from logs.
- Improve operational performance and resource optimization.
Amazon CloudWatch enables us to set alarms and automate actions based on either predefined thresholds, or on machine learning algorithms that identify anomalous behavior in your metrics. For example, it can start Amazon EC2 Auto Scaling automatically, or stop an instance to reduce billing overages. We can also use CloudWatch Events for serverless to trigger workflows with services like AWS Lambda, Amazon SNS, and AWS CloudFormation.
How it works:
- Infrastructure monitoring and troubleshooting.
- Mean Time to Resolution improvement. (MTTR improvement) . CloudWatch helps us to correlate, visualize, and analyze metrics and logs, so we can act quickly to resolve issues, and combine them with trace data from AWS X-Ray for end-to-end observability. You can also analyze user requests to help speed up troubleshooting and debugging, and reduce overall mean-time-to-resolution (MTTR).
- Proactive resource optimization. CloudWatch can take action based on the alarm to provision new resource or destroy existing resource.
- Application Monitoring on AWS or on premises.
- Log Analytics provides ability to query using a purpose-built query language to rapidly identify potential causes.
Five Features of CloudWatch :
- Easy to collect and store logs: Three types of logs are supported vended logs (VPC logs and Route 53 logs) , Service logs (AWS service logs) and custom logs( application logs). We can use AWS Systems Manager to install a CloudWatch Agent, or you can use the PutLogData API action to easily publish logs.
- Metrics both custom and built in.
- Container Insights simplifies the collection and aggregation of curated metrics and container ecosystem logs. It collects compute performance metrics such as CPU, memory, network, and disk information from each container as performance events and automatically generates custom metrics used for monitoring and alarming. The performance events are ingested as CloudWatch Logs with metadata about the running environment such as the Amazon EC2 instance ID, Service, Amazon EBS volume mount and ID, etc., to simplify monitoring and troubleshooting. CloudWatch custom metrics are automatically extracted from these ingested logs and can be further analyzed using CloudWatch Logs Insights’ advanced query language. Container Insights also provides an option to collect application logs (stdout/stderr), custom logs, predefined Amazon EC2 instance logs, Amazon EKS/k8s data plane logs and Amazon EKS control plane logs. For Amazon EKS and k8s clusters, a preconfigured FluentD agent can be used to collect your logs.
- Operational view with dashboard
- Logs and metrics correlation
- Container monitoring
- Anomaly detection
- Auto scaling.
- Automate response to operational changes with CloudWatch Events.
- Alarm and automate actions on EKS, ECS, and k8s clusters.
- Granular data and extended retention
- Custom operations on metrics
- Log analytics
- Analyze container metrics, logs, and traces
- Compliance and Security
- Amazon CloudWatch is integrated with AWS Identity and Access Management (IAM) so that we can control which users and resources have permission to access our data and how they can access it. Amazon CloudWatch Logs is also PCI and FedRamp compliant. Data is encrypted at rest and during transfer. You can also use AWS KMS encryption to encrypt our log groups for added compliance and security.
AWS CloudWatch FAQ.