|CloudWatch Agent||SSM Agent (AWS Systems Manager)||Custom Daemon Scripts|
- CloudWatch agent allows you to collect more system-level metrics from your EC2 and on-premises servers than just the standard CloudWatch metrics.
- It also enables you to retrieve custom metrics from your applications or services using the StatsD and collectd protocols. StatsD is supported on both Linux servers and servers running Windows Server. collectd is supported only on Linux servers.
- You can use CloudWatch agent to collect logs from your servers and send them to CloudWatch Logs.
- Metrics collected by the CloudWatch agent are billed as custom metrics.
- You can install CloudWatch Agent using three ways:
- via Command Line
- via SSM Agent
- via AWS CloudFormation
- SSM Agent is Amazon software that runs on your EC2 instances and your hybrid instances that are configured for Systems Manager.
- SSM Agent processes requests from the Systems Manager service in the cloud and configures your machine as specified in the request. You can manage servers without having to log in to them using automation.
- SSM Agent sends status and execution information back to the Systems Manager service by using the EC2 Messaging service.
- SSM Agent runs on Amazon EC2 instances using root permissions (Linux) or SYSTEM permissions (Windows).
- CloudWatch agent replaces SSM agent in sending metric logs to CloudWatch Logs.
- You use custom scripts (such as cron or bash scripts) if the two previously mentioned agents do not fit your needs.
- CloudWatch agent is useful for collecting system-level metrics and logs. You can create custom scripts that perform some modifications before the metrics are sent out.
- SSM Agent is also useful for automation purposes, though Systems Manager does not have a document for every case scenario. You may also have some compliance requirements that would require SSM Agent to be disabled (recall that SSM agent runs at root level permissions).