1 Answer
- Newest
- Most votes
- Most comments
0
Hello.
To output logs to CloudWatch Logs, you need to install CloudWatch Agent.
CloudWatch Agent is not installed by default, so you must install it yourself.
You can install it by following the steps in the document below.
Also, to output logs to CloudWatch, you need to set up an IAM role on EC2, so please set it up using the steps in the document below.
https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/install-CloudWatch-Agent-commandline-fleet.html
Relevant content
- asked 3 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 2 months ago
Thank you, for the Amazon Linux 2023, it does look like the cloudwatch agent is installed, which is listed in this doc https://docs.aws.amazon.com/linux/al2023/release-notes/all-packages-AL2023.2.html
The documentation you shared only indicates that the CloudWatch Agent is included in the package. That is, you need to run the dnf install command to install the CloudWatch Agent. https://repost.aws/knowledge-center/cloudwatch-push-metrics-unified-agent
By the way, Amazon Linxu2023 does not output "/var/log/messages" by default, so you need to install "rsyslog" with the following command.
An example configuration for CloudWatch Agent is as follows.