Skip to content

Instantly share code, notes, and snippets.

@adnams
Last active December 18, 2015 21:38
Show Gist options
  • Save adnams/5848409 to your computer and use it in GitHub Desktop.
Save adnams/5848409 to your computer and use it in GitHub Desktop.
files:
"/etc/rsyslog.conf":
mode: "000644"
owner: ec2-user
group: ec2-user
source: "http://your-app-library.s3.amazonaws.com/aws/eb/rsyslog.conf"
"/etc/log_files.yml":
mode: "000644"
owner: ec2-user
group: ec2-user
source: "http://your-app-library.s3.amazonaws.com/aws/eb/log_files.yml"
"/etc/syslog.papertrail.crt":
mode: "000644"
owner: ec2-user
group: ec2-user
source: "https://papertrailapp.com/tools/syslog.papertrail.crt"
services:
sysvinit:
rsyslog:
enabled: true
ensureRunning: true
files: "/etc/rsyslog.conf"
remote_syslog:
enabled: true
ensureRunning: true
files: "/etc/log_files.yml"
packages:
rubygems:
remote_syslog: []
yum:
rsyslog-gnutls.x86_64: []
commands:
make_apache_logs_readable:
command: "chmod 0755 /var/log/httpd"
test: "test -d /var/log/httpd"
create_php_logs_dir:
command: "mkdir -p /var/log/php && chmod 0755 /var/log/php && chown webapp:ec2-user /var/log/php"
test: "test -d /var/log"
make_remote_syslog_bootable:
command: "cp /usr/lib/ruby/gems/1.[-.0-9]*/gems/remote_syslog[-.0-9]*/examples/remote_syslog.init.d /etc/init.d/remote_syslog"
test: "! test -f /etc/init.d/remote_syslog"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment