Heroku Logging Configuration
Ship logs from Heroku to Logstash
Follow our Heroku tutorial to get started sending Heroku logs to Logstash for monitoring and analysis.
Install Integration
Setup
By setting up a log drain on your Heroku app, you can send all of your app's generated logs, as well as all Heroku platform logs (including those generated from the build and deployment process), to Logstash.
All you need to do is add this endpoint as a drain in your Heroku app using the Heroku CLI (opens in a new tab):
heroku drains:add https://@logitApiEndpoint/heroku?apikey=@apikey -a appname
Make sure to replace appname
with the name of your app you previously
created on your Heroku dashboard (opens in a new tab), or via the CLI.
We automatically parse the logs into a structured format for you, so all you need to do is analyse them.
For more information, see Heroku's official documentation on log drains (opens in a new tab).
Check Logit.io for your logs
Data should now have been sent to your Stack.
View My DataIf you don't see take a look at How to diagnose no data in Stack below for how to diagnose common issues.
How to diagnose no data in Stack
If you don't see data appearing in your stack after following this integration, take a look at the troubleshooting guide for steps to diagnose and resolve the problem or contact our support team and we'll be happy to assist.
Heroku Logging Overview
Heroku is a platform as a service (PaaS) owned by Salesforce. Heroku supports applications built in Java, Python, and Golang as well as a variety of other popular programming languages. Heroku can be used by developers to build, run and scale applications making it a widely used and popular cloud-based platform.
The Heroku app's various logs levels including; App logs, System logs, API logs & Add-on logs. App logs are generated when your application throws an exception, e.gsuch as when a missing dependency is discovered. System logs, on the other hand, will allow you to see when an application is restarted due to issues with your infrastructure.
Being able to tail both application and system logs in Heroku will allow you to see issues as they occur in real-time within your production environment. Monitoring these will help enable your teams to make changes fast to preserve the health of your infrastructure and resolve errors found in production.
The Logit.io platform allows you to tail Heroku logs with ease using our highly available enterprise-grade ELK (Elasticsearch, Logstash & Kibana) Stack for fast troubleshooting & analysis. Our platform also provides a comprehensive solution for centralising your log streams & outputs from many other applications including Docker, Kubernetes and Amazon Flow Logs](/integrations/log-management/aws/vpc).
If you need any additional assistance help with sending your Heroku log messages to Logstash our team are here to help. Feel free to get in contact with our support team via live chat and we'll be happy to assist.