Skip to content
This repository has been archived by the owner on Jun 28, 2020. It is now read-only.
/ kittens Public archive

Heroku log endpoint that displays router errors and timeouts

Notifications You must be signed in to change notification settings

lfittl/kittens

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kittens

Log drain target for your Heroku router logs to help you find 404s, 500s and timeouts errors.

kittens example screenshot

Heavily modified fork of heroku-log-store, storing log data in an attached PostgreSQL database.

Deploy

kittens is deployed best on Heroku, and set up as a log drain for your main application.

$ git clone git://github.com/lfittl/kittens.git
$ cd kittens
$ heroku create my-app-kittens
$ heroku config:set RACK_ENV=production
$ heroku config:set HTTP_AUTH_USER=myuser
$ heroku config:set HTTP_AUTH_PASSWORD=mypassword
$ heroku addons:add heroku-postgresql:basic
$ git push heroku master

Note that its probably a bad idea to run this on the free Heroku Postgres tier, because of the 10,000 row limit.

Setup database

Create the initial database structure using

$ heroku run migrate
Running `migrate` attached to terminal... up, run.4179

Setup Logdrain

Now, add the log drain to your main application:

$ heroku drains:add https://myuser:mypassword@my-app-kittens.herokuapp.com/drain --app my-app

To verify that you are receiving data correctly, view the kittens logs using heroku logs --tail.

Now, if you go to the main page of the app, it should show first data (check the 404 list, that one is easy to test).

Slack Notifications

slack screenshot

To setup daily notifications to Slack, use the Heroku scheduler add-on, and have it call rake daily_report every 24 hours.

In addition set the SLACK_WEBHOOK and APP_URL env variables appropriately.

Authors

About

Heroku log endpoint that displays router errors and timeouts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages