Engine Yard is a Platform-as-a-Service for deploying and scaling applications on EC2. Here’s how to aggregate system and app logs from Engine Yard Cloud servers, including chef deploy logs, Rails request logs, and Unix syslog.
This cookbook installs and sets up Papertrail’s tiny remote_syslog2 daemon (details), which reads and aggregates syslog and app logs in realtime. It also installs the syslog-ng server, a more feature-rich syslogd than is included in the standard EY Gentoo image.
default.rband change these options to reflect the details discovered in step two, and the logs you want to collect
If you don’t use chef, and just want to test on a single server, or can’t modify your chef recipes, you can setup EY-managed servers manually using Papertrail’s standard instructions.
From Papertrail’s Dashboard, click Add Systems and follow Papertrail’s Linux setup instructions to edit the system syslog configuration. The instructions also cover how to manually install
remote_syslog2 for app logs.
When you try to run a deployment, you see the following error message:
ERROR: package[app-admin/syslog-ng] (/etc/chef-custom/recipes/cookbooks/papertrail/recipes/default.rb line 44) had an error: emerge -g --color n --nospinner --quiet =app-admin/syslog-ng-3.3.5 returned 1, expected 0 ---- Begin output of emerge -g --color n --nospinner --quiet =app-admin/syslog-ng-3.3.5
This is caused by a bug in the
emerge_package doesn’t unmask the syslog-ng package, which prevents it from being installed. To fix it, download and apply the updated version of
enable_package.rb from the emerge cookbook here.
emerge/definitions/enable_package.rb in your own cookbook repo with this patched file. If the
emerge cookbook is not already included in
main/recipes/default.rb, add it. The result will be un-masking syslog-ng so that it can be installed.