Open lesterxy opened 1 week ago
how to download v.1.300048.1b904 binary?
I'm also encountering this in v1.300049.1b929.
EDIT: additional details from https://github.com/aws/amazon-cloudwatch-agent/pull/1440 indicates:
In version 1.300049.0 and above, the agent will log the above message regardless of log levels on a defined interval. This is because we recently enabled instance tags by default to retrieve ASG name and instance tag name for entity service names. This becomes an issue when instance metadata tags is not enabled which can be majority case since instance metadata tags is an opt-in feature. The issue is especially apparent in EKS since EKS does not support instance metadata tags
Instance metadata tags instructions: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/work-with-tags-in-IMDS.html#allow-access-to-tags-in-IMDS
Describe the bug
cloudwatch agent logs throw repeated errors.
status code: 404, request id: D! should retry true for imds error : EC2MetadataError: failed to make EC2Metadata request
This only happened on v.1300049. On v.1.300048.1b904, agent don't have error logs.
Steps to reproduce
Create an Ubuntu 22.04.5 LTS EC2 instance.
Create and attach Role to EC2 with "CloudWatchAgentServerPolicy" managed policy.
Install the cloudwatch agent using the documentation (root user): 3.1. wget https://amazoncloudwatch-agent.s3.amazonaws.com/ubuntu/amd64/latest/amazon-cloudwatch-agent.deb 3.3. dpkg -i -E ./amazon-cloudwatch-agent.deb 3.4. /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-config-wizard 3.5. /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -s -c file:/opt/aws/amazon-cloudwatch-agent/bin/config.json
Check the agent status: systemctl status amazon-cloudwatch-agent
What did you expect to see? No errors on the status logs.
What did you see instead?
from journalctl, this log keeps repeating
What version did you use? v1.300049.1b929
What config did you use? Reference agent config output:
Environment OS version: Ubuntu 22.04.5 LTS
Additional context This only happened on v.1300049. On v.1.300048.1b904, agent don't have error logs.