- Newest
- Most votes
- Most comments
Hello,
In the AWS documentation, I found the following information:
If you update your CloudWatch agent configuration file, the next time that you start the agent, you need to use the fetch-config option.
Try starting the agent using the following command:
sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -s -m ec2 -c file:configuration-file-path
You need to replace configuration-file-path with the path to env-config.json.
Hello,
It sounds like the issue is with the CloudWatch agent not recognizing your updated configuration file. Make sure the path to env-config.json is correct and that the file is properly formatted. The error message indicates it couldn't find valid outputs in your configuration. Double-check your configuration file and try restarting the agent with the correct path. If the issue persists, verify the file’s content and format against AWS documentation or consider seeking further support.
https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/troubleshooting-CloudWatch-Agent.html
Relevant content
- asked 3 years ago

It doesn't work. sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -s -m ec2 -c file:opt/aws/amazon-cloudwatch-agent/etc/env-config.json. It throws an error "Error running agent: no outputs found, did you provide a valid config file?
If the CloudWatch agent fails to start, there might be an issue in your configuration. Configuration information is logged in the
configuration-validation.logfile. This file is located in/opt/aws/amazon-cloudwatch-agent/logs/configuration-validation.log.It is recommended to check the configuration file. Providing the configuration file could help in resolving the issue.