Unified CloudWatch Agent Training
Overview
The Unified CloudWatch Agent is a tool used to collect metrics and logs from EC2 instances and on-premise servers. It provides additional system-level metrics and the ability to send logs to CloudWatch Logs.
Key Points
- Purpose: Collect additional system-level metrics such as RAM usage, process activity, and disk space utilization. It also enables the sending of logs to CloudWatch Logs.
- Default Behavior: By default, EC2 instances do not send logs or metrics to CloudWatch without an agent.
- Necessity for Metrics: To obtain memory metrics from EC2 instances, the Unified CloudWatch Agent is required.
- Configuration: The agent can be configured using the SSM Parameter Store for centralized management or by specifying a configuration file.
- Permissions: Appropriate IAM permissions are necessary for the agent to send metrics and logs to CloudWatch. This applies to both EC2 instances and on-premise servers.
- Metric Namespace: Metrics pushed by the agent start with the prefix
CWAgent. This is customizable but is the default setting.
- procstat Plugin: A feature of the CloudWatch Agent that allows monitoring of individual process utilization on Linux and Windows servers. Metrics can be filtered by PID, process name, or pattern and will have the
procstat prefix (e.g., procstat_time, procstat_cpu_usage).
Configuration and Permissions
- EC2 Instance Setup:
- Install the Unified CloudWatch Agent.
- Configure the agent with the necessary settings.
- Attach the correct IAM role with the required permissions.
- On-Premise Server Setup:
- Install the Unified CloudWatch Agent similarly to EC2.
- Specify IAM permissions for the agent to interact with AWS services.
- Ensure the agent can push logs and metrics to CloudWatch.
Exam Tips
- Remember that the Unified CloudWatch Agent is essential for detailed system-level metrics and logs.
- Know that the
procstat plugin is part of the CloudWatch Agent and is used to monitor individual processes.
- Metrics sent by the agent will have specific prefixes (
CWAgent for general metrics, procstat for process-specific metrics).
Conclusion
The Unified CloudWatch Agent is a crucial tool for detailed monitoring and logging of EC2 and on-premise server metrics. Proper configuration and permissions are key to leveraging its full capabilities.