logstash - Is it possible to have Centralised Logging for ElasticBeanstalk Docker apps? -


we have custom docker web app running in elastic beanstalk docker container environment. have application logs available viewing outside. without downloading through instances or aws console.

so far neither of solutions been acceptable. maybe achieved centralised logging elastic benastalk dockerized apps?

solution 1: aws console log download

not acceptable - requires download logs, extract every time. non real-time.

solution 2: s3 + elasticsearch + fluentd

fluentd not have plugin retrieve logs s3 there's excellent s3 plugin, it's log output s3. not input logs s3.

solution 3: s3 + elasticsearch + logstash

cons: can pull logs entire bucket or nothing.

the problem lies elastic beanstalk s3 log storage structure. cannot specify file name pattern. it's either logs or nothing. elasticbeanstalk saves logs on s3 in path containing random instance , environment ids:

s3.bucket/resources/environments/logs/publish/e-<random environment id>/i-<random instance id>/my.log@ 

logstash s3 plugin can pointed resources/environments/logs/publish/. when try point environments/logs/publish/*/my.log not work. means can not pull particular log , tag/type able find in elasticsearch. since aws saves logs environments , instances in same folder structure, cannot chose instance.

solution 4: aws cloudwatch console log viewer

it possible forward custom logs cloudwatch console. achieve that, put configuration files in .ebextensions path of app bundle: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/awshowto.cloudwatchlogs.html

there's file called cwl-webrequest-metrics.config allows specify log files along alerts, etc. great!? except configuration file format neither yaml,xml or json, , it's not documented. there absolutely 0 mentions of file, it's format either on aws documentation website or anywhere on net. , 1 log file appear in cloudwatch not adding configuration line. possible way working seem trial , error. great!? except every attempt need re-deploy environment.

there's 1 reference how make work custom log: http://qiita.com/kozayupapa/items/2bb7a6b1f17f4e799a22 have no idea how person reverse engineered file format.

cons:

  • cloudwatch not seem able split logs columns when displaying, can't filter priority, etc.
  • aws console log viewer not have auto-refresh follow logs.
  • nightmare undocumented configuration file format, no way of testing. trial , error requires re-deploying whole instance.

perhaps aws lambda function applicable?

write javascript dumps notifications, see can those.

after object written, rename within same bucket?

or notify own log-management service creation of new object?

lots of possibilities there...


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -