How to Configure Papertrail Log Notifications to Slack

Tadashi Shigeoka ·  Mon, August 28, 2017

I configured Papertrail, a log management add-on frequently used on Heroku, to send error log notifications to a Slack channel, so I’ll introduce the method.

papertrail

Configuring Papertrail to Notify Specific Logs

Saving Specific Keyword Searches

First, search for specific keywords and save the search results.

Search Log | papertrail | Heroku

Click the Save & Setup an Alert button to proceed with notification settings.

Save Search | papertrail

Selecting Papertrail Alert Notification Destination

You can configure alert notification destinations from the Create an Alert page.

Create an Alert | papertrail

Most major services are available, and you can choose from categories like Email, Chat, Monitoring & Notifications, Graphing & Metrics.

This time, I’ll select Slack and proceed with configuration.

Configuring Papertrail Notifications to Slack

Set up Papertrail app integration on the Slack side.

Specify the notification destination Slack Channel and click the Add Papertrail Integration button to proceed with configuration.

papertrail integration | Slack Setup papertrail integration | Slack

Once you get the Slack Webhook URL, copy it and return to the Papertrail configuration screen.

Integration Settings | Slack

Configuring Slack Webhook URL in Papertrail

Save the Slack Webhook URL in Papertrail’s alert management screen.

Create Alert | papertrail

Once configuration is complete, a page like the following will be displayed.

Alert Setting | papertrail

By utilizing Papertrail and Slack, we can now receive immediate notifications for only important error logs.

Reference Information

That’s all from the Gemba.