TIL
Beanstalk is a little bit... magic. Dunno yet if its good or not :
Elastic Beanstalk creates log volumes on the container instance, one for each container, at /var/log/containers/containername. These volumes are named awseb-logs-containername and should be mounted to the location within the container file structure where logs are written.
For example, the following mount point maps the nginx log location in the container to the Elastic Beanstalk–generated volume for the nginx-proxy container.
{
"sourceVolume": "awseb-logs-nginx-proxy",
"containerPath": "/var/log/nginx"
}
And all this logs can be copied into s3 automagically: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options-general.html#command-options-general-elasticbeanstalkhostmanager
-
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_docker_v2config.html#create_deploy_docker_v2config_dockerrun_formataws logs get-log-events --log-group-name XX --log-stream-name YY --start-time 1476350746000
Je commence à bien aimer aws.
-
https://links.infomee.fr/?ZHDmkABon à savoir, pour rediriger la sortie standard d'un cron dans un fichier avec la date, penser à échapper les "%"
/path/to/log/dir/$(date +\%Y-\%m-\%d).log
-
http://www.idevelopment.info/data/Oracle/DBA_tips/Unix/UNIX_7.shtml