Skip to content

Instantly share code, notes, and snippets.

@jwhiting
Created May 1, 2018 04:30
Show Gist options
  • Save jwhiting/e58d9e6a19d9311df1894f1b03c035a1 to your computer and use it in GitHub Desktop.
Save jwhiting/e58d9e6a19d9311df1894f1b03c035a1 to your computer and use it in GitHub Desktop.
option_settings:
- namespace: aws:elasticbeanstalk:cloudwatch:logs
option_name: StreamLogs
value: true
- namespace: aws:elasticbeanstalk:cloudwatch:logs
option_name: DeleteOnTerminate
value: false
- namespace: aws:elasticbeanstalk:cloudwatch:logs
option_name: RetentionInDays
value: 14
files:
"/etc/awslogs/config/stdout.conf":
mode: "000744"
owner: root
group: root
content: |
[/var/log/containers/unicorn-stdouterr]
log_group_name=/aws/elasticbeanstalk/`{ "Ref" : "AWSEBEnvironmentName" }`/unicorn-stdouterr.log
log_stream_name={instance_id}
file=/var/log/containers/unicorn-*-stdouterr.log
[/var/log/containers/nodejs-stdouterr]
log_group_name=/aws/elasticbeanstalk/`{ "Ref" : "AWSEBEnvironmentName" }`/nodejs-stdouterr.log
log_stream_name={instance_id}
file=/var/log/containers/noshipnode-*-stdouterr.log
[/var/log/containers/nginx-stdouterr]
log_group_name=/aws/elasticbeanstalk/`{ "Ref" : "AWSEBEnvironmentName" }`/nginx-stdouterr.log
log_stream_name={instance_id}
file=/var/log/containers/nginx-*-stdouterr.log
commands:
"00_restart_awslogs":
command: service awslogs restart
@genert
Copy link

genert commented Jan 6, 2019

Thank you! 👍

@lokeshmeher
Copy link

Thanks !!!

@mulhoon
Copy link

mulhoon commented Sep 29, 2020

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment