Skip to content

Instantly share code, notes, and snippets.

@esurdam
Last active January 12, 2018 09:18
Show Gist options
  • Save esurdam/69d1613ebfe6121fafa241ab4aa19bdd to your computer and use it in GitHub Desktop.
Save esurdam/69d1613ebfe6121fafa241ab4aa19bdd to your computer and use it in GitHub Desktop.
AWSlogs config file
[general]
state_file = /var/lib/awslogs/agent-state
[messsages]
datetime_format = %b %d %H:%M:%S
file = /var/log/messages
buffer_duration = 5000
log_stream_name = {hostname} - {instance_id}
initial_position = start_of_file
log_group_name = messages
[nginx_site_access]
datetime_format = %b %d %H:%M:%S
file = /var/log/nginx/payables_access.log
buffer_duration = 10000
log_stream_name = {hostname} - {instance_id} - payables web access
initial_position = start_of_file
log_group_name = nginx
[nginx_site_error]
datetime_format = %b %d %H:%M:%S
file = /var/log/nginx/payables_error.log
buffer_duration = 10000
log_stream_name = {hostname} - {instance_id} - payables web error
initial_position = start_of_file
log_group_name = nginx
[nginx_api_access]
datetime_format = %b %d %H:%M:%S
file = /var/log/nginx/api_payables_access.log
buffer_duration = 10000
log_stream_name = {hostname} - {instance_id} - payables api access
initial_position = start_of_file
log_group_name = nginx
[nginx_api_error]
datetime_format = %b %d %H:%M:%S
file = /var/log/nginx/api_payables_error.log
buffer_duration = 10000
log_stream_name = {hostname} - {instance_id} - payables api error
initial_position = start_of_file
log_group_name = nginx
[burris_access]
datetime_format = %b %d %H:%M:%S
file = /var/log/nginx/burris_access.log
buffer_duration = 10000
log_stream_name = {hostname} - {instance_id} - burris_access
initial_position = start_of_file
log_group_name = nginx
[burris_error]
datetime_format = %b %d %H:%M:%S
file = /var/log/nginx/burris_error.log
buffer_duration = 10000
log_stream_name = {hostname} - {instance_id} - burris_error
initial_position = start_of_file
log_group_name = nginx
[php-fpm]
datetime_format = %b %d %H:%M:%S
file = /var/log/php-fpm/5.5/error.log
buffer_duration = 10000
log_stream_name = {hostname} - {instance_id} - php-fpm
initial_position = start_of_file
log_group_name = php-fpm
[monit]
datetime_format = %b %d %H:%M:%S
file = /var/log/monit
buffer_duration = 10000
log_stream_name = {hostname} - {instance_id} - monit
initial_position = start_of_file
log_group_name = monit
[security]
datetime_format = %b %d %H:%M:%S
file = /var/log/secure
buffer_duration = 10000
log_stream_name = {hostname} - {instance_id} - secure
initial_position = start_of_file
log_group_name = secure
[mail]
datetime_format = %b %d %H:%M:%S
file = /var/log/maillog
buffer_duration = 10000
log_stream_name = {hostname} - {instance_id} - mail
initial_position = start_of_file
log_group_name = mail
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment