somleng / freeswitch-config

FreeSWITCH config for Somleng
MIT License
8 stars 7 forks source link

Fix logging. Right now it's using disk space. Docker logs should properly log to CloudWatch #8

Closed dwilkie closed 7 years ago

dwilkie commented 7 years ago

Discussion

Opened issue: https://github.com/aws/amazon-ecs-agent/issues/861

To read

http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.logging.html#health-logs-extend https://serverfault.com/questions/695188/out-of-space-on-ec2-instance-due-to-docker-logs https://forums.aws.amazon.com/thread.jspa?threadID=164502 https://github.com/aws/amazon-ecs-agent/issues/632

Logs are kept here

/var/lib/docker/containers/591699f2d094f416de337c05c4b5151c928bc2f25d6625304a0913dc1bdb2151/591699f2d094f416de337c05c4b5151c928bc2f25d6625304a0913dc1bdb2151-json.log

Dockerrun.aws.json

{
  "AWSEBDockerrunVersion": 2,
  "volumes": [
    {
      "name": "freeswitch-logs",
      "host": {
        "sourcePath": "/var/log/containers/freeswitch"
      }
    }
  ],
  "containerDefinitions": [
    {
      "mountPoints": [
        {
          "sourceVolume": "freeswitch-logs",
          "containerPath": "/var/log/freeswitch"
        },
      ],
      "logConfiguration": {
          "logDriver": "awslogs",
          "options": {
              "awslogs-group": "awslogs-freeswitch",
              "awslogs-region": "ap-southeast-1",
              "awslogs-stream-prefix": "awslogs-freeswitch"
          }
      }
    }
  ]
}
dwilkie commented 7 years ago

Closed by https://github.com/dwilkie/freeswitch-config/commit/a8b4c814b3b474e118b31445c89126861c7f89a6

Not exactly sure why