Skip to content

There are no logs in Cloudwatch Logs after enabling CloudWatch Application Signals

0

Service provide logs for every request except healthcheck. And that logs means a lot for development and production usage of our services. After enabling Application Signals no logs in Cloudwatch Logs after agent being initialised. How to fix that? How to have service logs back in Cloudwatch logs?

1 Answer
-1

If you're experiencing issues with logs not appearing in CloudWatch Logs after enabling CloudWatch Application Signals, there are several steps you can take to troubleshoot and resolve the issue:

  1. Check the CloudWatch agent configuration: Ensure that the CloudWatch agent is correctly configured to collect and send logs from your service. Review the configuration file (typically named app-signals-config.json) to verify that the correct log file paths are specified.

  2. Verify log file paths: Make sure the log files you expect to be collected actually exist at the specified paths and that the CloudWatch agent has permission to read these files.

  3. Examine the CloudWatch agent status: Check if the CloudWatch agent is running without errors. You can do this by reviewing the agent's log files or using the CloudWatch agent command-line interface to check its status.

  4. Test connectivity: Ensure that your EC2 instance or the environment where your service is running can reach the CloudWatch Logs endpoint. You can test this using telnet or nc commands to the appropriate regional endpoint.

  5. Check IAM permissions: Verify that the IAM role or user associated with your service has the necessary permissions to publish logs to CloudWatch. The role should have permissions for actions like "logs:CreateLogStream" and "logs:PutLogEvents".

  6. Review log group settings: Check the log group in CloudWatch to ensure it has an appropriate retention period set and that you're looking for logs within that retention period.

  7. Restart the CloudWatch agent: If you've made configuration changes, try restarting the CloudWatch agent to ensure the new settings are applied.

  8. Separate Application Signals configuration: Consider using a separate configuration file for Application Signals and traditional log collection. This can help isolate any issues specific to Application Signals.

If these steps don't resolve the issue, you may need to temporarily disable Application Signals to see if that restores normal log collection. If it does, you might need to review your Application Signals setup or contact AWS support for further assistance.

Remember, Application Signals is designed to enhance your observability, not replace existing logging mechanisms. Your service logs should still be collected and sent to CloudWatch Logs independently of Application Signals functionality.
Sources
Monitor Java apps running on Tomcat server with Amazon CloudWatch Application Signals | AWS Cloud Operations Blog
Resolve empty log issues in CloudWatch | AWS re:Post

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.