相关疑难解决方法(0)

AWS Elastic Beanstalk:将自定义日志添加到CloudWatch?

如何将自定义日志添加到CloudWatch?发送默认日志但是如何添加自定义日志?

我已经添加了这样一个文件:(在.ebextensions中)

files:
  "/opt/elasticbeanstalk/tasks/bundlelogs.d/applogs.conf" :
    mode: "000755"
    owner: root
    group: root
    content: |
      /var/app/current/logs/*

  "/opt/elasticbeanstalk/tasks/taillogs.d/cloud-init.conf" :
    mode: "000755"
    owner: root
    group: root
    content: |
      /var/app/current/logs/*
Run Code Online (Sandbox Code Playgroud)

正如我所做的bundlelogs.d和taillogs.d这些自定义日志现在已经从控制台或网络中添加或检索,这很好但是它们不会持久存在且不会在CloudWatch上发送.

在CloudWatch中,我有默认日志,
/aws/elasticbeanstalk/InstanceName/var/log/eb-activity.log
而我希望有另一个这样的日志
/aws/elasticbeanstalk/InstanceName/var/app/current/logs/mycustomlog.log

amazon-web-services amazon-cloudwatch amazon-elastic-beanstalk amazon-cloudwatchlogs

19
推荐指数
3
解决办法
6948
查看次数