Name: heroku-log-s3
Owner: nice-registry
Description: log drain from heroku to s3. grep by line prefix and buffer upload to s3 as timestamped files
Forked from: choonkeat/heroku-log-s3
Created: 2017-11-19 03:34:02.0
Updated: 2017-11-19 03:34:05.0
Pushed: 2016-08-17 06:56:48.0
Size: 9
Language: Ruby
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Setup the following ENV
(aka heroku config:set
)
FILTER_PREFIX
this is the prefix string to look out for. every other log lines are ignoredS3_KEY
, S3_SECRET
, S3_BUCKET
necessary ACL to your s3 bucketDURATION
(default 60
) seconds to buffer until we close the IO
to AWS::S3::S3Object#write
STRFTIME
(default %Y%m/%d/%H/%M%S.:thread_id.log
) format of your s3 object_id
:thread_id
will be replaced by a unique number to prevent overwriting of the same file between reboots, in case the timestamp overlapsHTTP_USER
, HTTP_PASSWORD
(default no password protection) credentials for HTTP Basic AuthenticationWRITER_LIB
(default ./writer/s3.rb
) defines the ruby script to load Writer
classIn your heroku app, add this drain (changing HTTP_USER
, HTTP_PASSWORD
and DRAIN_APP_NAME
to appropriate values)
ku drains:add https://HTTP_USER:HTTP_PASSWORD@DRAIN_APP_NAME.herokuapp.com/
or if you have no password protection
ku drains:add https://DRAIN_APP_NAME.herokuapp.com/