简体   繁体   中英

Streaming Logs With Elastic Beanstalk

Is it possible to watch (tail) the logs from an app hosted on Elastic Beanstalk from the command line?

I know this is possible in Heroku using heroku logs -t , but am unsure if there is a way to do this with Beanstalk. If not, any suggestions or tips on how to best manage the logs?

You can ssh to Elastic Beanstalk instance and tail any log. Alternatively, you can publish logs to S3 .

For example, the following logs are available for Python environment:

/opt/python/log/httpd.out
/var/log/httpd/error_log
/var/log/cfn-hup.log
/opt/python/log/supervisord.log
/var/log/eb-tools.log
/var/log/httpd/access_log
/var/log/eb-cfn-init-call.log
/var/log/eb-publish-logs.log
/var/log/cfn-init.log

You can find the list of logs available for your environment in web console: Logs > Snapshot Logs > View log file

You will be better off using services like loggly and splunk. You can live watch the logs from multiple server simultaneously and live in the browser itself.

There are free plans also available.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM