You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off - thanks for all the hard work that's gone into the integration documentation and examples! Really made it easy to get started with Papertrail.
I'd like to suggest one improvement to the Elastic Beanstalk example, however. As written, examples/remote_syslog.ebextensions.config uses a container_command to restart remote_syslog. However, container_command items are executed prior to deployment - that is, after the application has been extracted to /var/app/ondeck/ but before it's been deployed to /var/app/current/.
I wanted to monitor the Rails application log file at /var/app/current/log/production.log, but the daemon gets confused if it's started in a container_command, since /var/app/current/ will later be deleted and replaced by /var/app/ondeck/. The symptom is that Papertrail is successfully running and monitoring all files except the one under /var/app/current/, and the problem can be worked around by ssh'ing and executing sudo /sbin/service remote_syslog restart.
My solution (found at https://github.com/brian626/remote_syslog2/tree/eb_example) is to move the restart to a post-deploy hook. That way, /var/app/current/ has already been deployed and the daemon doesn't get confused. Unfortunately, Elastic Beanstalk does not provide an official way to add post-deploy hooks, so it involved a bit of a hack - namely, dropping a script into a specific directory.
This might not be widely applicable to common Papertrail/Elastic Beanstalk integrations, but I thought I'd write it up in case anyone else was having trouble.
The text was updated successfully, but these errors were encountered:
Sorry - forgot that I meant to test using /var/app/support/logs/production.log (which is a symlink to /var/app/current/log/production.log, with the exception that /var/app/support/ persists between deploys) but that does not help.
Hi,
First off - thanks for all the hard work that's gone into the integration documentation and examples! Really made it easy to get started with Papertrail.
I'd like to suggest one improvement to the Elastic Beanstalk example, however. As written,
examples/remote_syslog.ebextensions.config
uses acontainer_command
to restartremote_syslog
. However,container_command
items are executed prior to deployment - that is, after the application has been extracted to/var/app/ondeck/
but before it's been deployed to/var/app/current/
.I wanted to monitor the Rails application log file at
/var/app/current/log/production.log
, but the daemon gets confused if it's started in acontainer_command
, since/var/app/current/
will later be deleted and replaced by/var/app/ondeck/
. The symptom is that Papertrail is successfully running and monitoring all files except the one under/var/app/current/
, and the problem can be worked around by ssh'ing and executingsudo /sbin/service remote_syslog restart
.My solution (found at https://github.com/brian626/remote_syslog2/tree/eb_example) is to move the restart to a post-deploy hook. That way,
/var/app/current/
has already been deployed and the daemon doesn't get confused. Unfortunately, Elastic Beanstalk does not provide an official way to add post-deploy hooks, so it involved a bit of a hack - namely, dropping a script into a specific directory.This might not be widely applicable to common Papertrail/Elastic Beanstalk integrations, but I thought I'd write it up in case anyone else was having trouble.
The text was updated successfully, but these errors were encountered: