I recently configured the Amazon CloudWatch Agent by adding lines to an .ebextensions file
files:
"/tmp/custom-cloudwatch-config.json":
mode: "000600"
owner: root
group: root
content: |
{
"logs": {
"logs_collected": {
"files": {
"collect_list": [
{
"file_path": "/var/log/app-logs/*.log",
"log_group_name": "`{"Fn::Join":["/", ["/aws/elasticbeanstalk", { "Ref":"AWSEBEnvironmentName" }, "var/log/app-logs"]]}`",
}
]
}
}
}
}
container_commands:
01_append_logs_config:
command: amazon-cloudwatch-agent-ctl -a append-config -m ec2 -s -c file:/tmp/custom-cloudwatch-config.json
After deploying this configuration file, I lost access to common log files that I previously obtained when running the command eb logs -a , such as cfn-init.log, cfn-init-cmd.log, messages, web.stdout.log, and others.
It appears that this configuration file may have overridden some default settings. I would like to back to previous behavior where I got these files