Skip to content

Instantly share code, notes, and snippets.

@hydraslay
Forked from jwhiting/stdout.conf
Created February 21, 2020 03:34
Show Gist options
  • Save hydraslay/3ace049bf2a72fac65d1d0b195db63e0 to your computer and use it in GitHub Desktop.
Save hydraslay/3ace049bf2a72fac65d1d0b195db63e0 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment