Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When the agent can't tail a log it silently fails and doesn't write out an log message #1404

Open
chubbard opened this issue Oct 31, 2024 · 0 comments

Comments

@chubbard
Copy link

chubbard commented Oct 31, 2024

Describe the bug
The cloudwatch agent fails to write out an error when it can't read any of the configured log files. This leads to lots of theorizing as to why a log file isn't being loaded. The only way to know that amazon-cloudwatch-agent is "working" is if you happen to have multiple log files configured and some are uploading but others aren't. Then you can begin to figure out that it's a permission issue with the logs not being uploaded.

Steps to reproduce

  1. Configure you agent to upload any log file.
  2. Then change the permissions on that log file so that cwagent cannot read it.
  3. Open up the agent's log file. There will be no mention of the fact that the cloudwatch agent can't read the file.

What did you expect to see?
It's crucial for troubleshooting that an error message be written out to tell the operator that the cloudwatch agent can't read any of the configured log file.

What did you see instead?
Nothing. There is no log message written when it can't read a configured log file.

What version did you use?
Version: 1.300044.0-1.amzn2

What config did you use?
Config: You can reproduce this with just the default config and modify it to load a log file.

Environment
OS: Amazon Linux 2023

Additional context
None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant