Can I Monitor My Application Logs Using Slack?

Sending error notifications by email is a pretty common method for most log monitoring systems. For Loupe, it’s the default method. If you want to make personal error notifications for your application, any user can create email notifications for warnings, errors, and other events.

If you want to make notifications for your whole team though, leveraging a messaging application like Slack can be very handy. Creating a dedicated channel for notification alerts can help ensure your entire team is in the know without setting up individual notifications.

In this article, we will briefly discuss the benefits of integrating log monitoring with a messaging service, and then I’ll dive into how to integrate a Slack channel with Loupe Server.

Why Integrate Your Log Monitoring With a Messaging Service?

Here are a few reasons why integrating your log monitoring with a messaging system can benefit you and your team:

  • It reduces the effort needed during onboarding. Instead of setting up individual notifications for every person that joins your team, you can just invite them to the appropriate messaging channel. Reducing the notification creation to just an invite helps people move from one project to another often and helps for temporary projects where you can save considerable time setting up one notification to a channel instead of one for each person.

  • It provides a convenient place to start discussing the alerts together. A dedicated channel for application alerts not only provides a place to send alerts but a place to discuss them quickly. You can forward an email alert easily enough, but it’s possible to forget to add someone to the message chain, and email isn’t always the best way to discuss a problem efficiently. With a dedicated channel in a messaging service, you can just send a message to everyone who can react to the alert without worry.

  • For some teams, it’s just a better culture fit. Some organizations lean on messaging applications more than others. Those who do use messaging services more often than email may be more likely to stay on top of their messages than their emails in turn. Whether email or messaging is preferred will differ from organization to organization and for each person. But it is nice to have the option to set up application alerts for the platform you are more likely to check often. Notably, it’s essential for application alerts because some problems will require urgent fixes, and the sooner a team knows, the better.

There are plenty of situations where an email notification is preferable. For instance, if you work alone, it’s easier to create personal email notifications in the app. But for many, creating a slack channel for application alerts will make a lot of sense.

How to Integrate Slack with Loupe Server

In order to perform the integration, you need to first do the following:

  • Make sure you are an Admin for Loupe Server. If you are not, discuss the integration with an Admin.
  • Create the Slack Channel you want to use as the destination for application alerts.

With these items out of the way, you can get the process started. Open Loupe Server, go to the user menu, and click the “Administration” button.

Screenshot of the open user menu with the mouse cursor over the "admin" button

From the administration menu, navigate to the “services & notification” section and click the “external services” link.

The “external services” menu allows you to integrate messaging services with Loupe, including Microsoft Teams, Google Hangouts, and Hipchat. In this example, we will add our first external service and select Slack.

Screenshot of the extenral services menu, with the new service button clicked and the slack option selected

For Slack, we will need the following information to make the connection:

  • Webhook URL
  • Name of your team on Slack
  • The Slack Channel Name where you want to send alerts
  • The Slack team URL
  • A Label to identify the Loupe service

The Webhook URL tends to be the item most people have an issue finding. That’s because many don’t have a Webhook URL for their Slack in the first place.

Creating one requires users to go to the Slack administration menu and go to the “Create a Custom App” menu. Slack Webhooks are intended to connect custom software. Just, in this case, you are not creating that software yourself.

Follow through the application set up on Slack, and you will be sent to a new “workspace.” Here, you can go to the “Incoming Webhooks” menu and generate a webhook for Loupe.

Screenshot of the Slack custom webhook screen

Once you put all the information into Loupe successfully, Slack will announce you have integrated Loupe, and Loupe will send a test message to the channel.

A screenshot of the test message from Loupe in slack

Follow the link from the initial message, and you can create a notification using the same parameters you would use for a personal email notification.

Screenshot of the notification editor on Loupe Server

Make Effective Notifications with Loupe

With Loupe, it’s not hard to create personal email notifications or group notifications using your messaging service. But you don’t have to take my word for it. You can try it for yourself using the free 30 day Loupe Trial in the link below.

Try Out Loupe Server

Rock solid centralized logging

Unlimited applications, unlimited errors, scalable from solo startup to enterprise.