Open brian626 opened 7 years ago
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.
Can you explain your solution for this problem? We have the same issues and could figure out how to do a workaround.
Got it. You posted the link to the changed file :) Thanks!
Confirmed with @TAiS46 that the latest release v0.20-beta2 pre-release also solves this problem, by periodically checking for stale files.
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.