- Más nuevo
- Más votos
- Más comentarios
The log snippet you provided shows the error related to disk input plugin and "/sys/kernel/debug/tracing" being denied.Ensure that the user running the CloudWatch agent has the necessary permissions to read the log files. Check the file permissions for /var/log/myservice.log and /var/log/audit/audit.log to make sure the agent has the required access and also verify that the EC2 instance has the necessary outbound network access to communicate with CloudWatch. Check the security group and network ACL settings
Thanks,
So I did re-run the wizard and made sure I selected run as root, and watched a bit more the results. So when the wizard finished, I saw the confirm file along with /opt/aws/amazon-cloudwatch-agent/bin/config.json successfully. When I looked at that file, I see the 2 key items, the runas root and my log information.
I manually stop the agent, /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a stop
and then start /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a start
and do see it running as root now (good), that error is gone, however I don't see the log getting written to the log group.
The root user can naturally see the file, and the CW agent should have access to cloudwatch as I mentioned that server has the CloudWatchAgentServerPolicy role so think that is all that is needed and there is no outbound network rules preventing.
Contenido relevante
- OFICIAL DE AWSActualizada hace 2 años
- OFICIAL DE AWSActualizada hace 3 años
- OFICIAL DE AWSActualizada hace un año