logo

How to create Slack APP and use it with HAProxy-WI

About Slack

Slack is a proprietary business communication platform developed by American software company Slack Technologies. Slack offers many IRC-style features, including persistent chat rooms (channels) organized by topic, private groups, and direct messaging.

Slack offers many IRC-style features, including persistent chat rooms (channels) organized by topic, private groups, and direct messaging. Content, including files, conversations, and people, is all searchable within Slack. Users can add emoji buttons to their messages, on which other users can then click to express their reactions to messages.

Slack's free plan allows only the 10,000 most recent messages to be viewed and searched.

On March 18, 2020, Slack redesigned its platform to simplify and customize the user experience.

Go to TOP

About Checker

Checker monitors HAProxy and Nginx services and HAProxy backends. If a backend or a HAProxy/Nginx service is down, Checker will send an alert via Telegram and/or Slack. Real-time alerts are sent via HAProxy-WI. The incident history is preserved.

Go to TOP

How to get Slack token

First, create a Slack app in your Slack API dashboard. Log into your Slack workspace in your browser and go to your API dashboard. Click Create an App button.

How to get Slack token

Next, you will have to give a name to your application and select a Slack workspace for development. For the purposes of this tutorial, name your application HAProxy-WI and select a workspace to which you have administrator access. Then click the Create App button.

How to get Slack token

After creating your application, you should see the default application dashboard appear. In this dashboard, you will manage the application, permissions, subscription to events, the installation ofthe application to workspaces, and more.

How to get Slack token

You need to grant your app post permissions so that it send messages to channels. To do this, click the Permissions button on the control panel.

How to get Slack token

Scroll down the OAuth & Permissions page until you find the Scopes section. Find the Bot Token Scopes subsection in the scope and click the Add an OAuth Scope button.

How to get Slack token

Click the button and enter chat: write. Select this permission and add it to your bot. This will allow the app to send messages to the channels it has access to.

How to get Slack token

After adding the necessary permissions you can install the application into the Slack workspace. Scroll to the top of the OAuth & Permissions page and click the Install App to Workspace button at the top.

How to get Slack token

Click this button and see what actions the application can take on the channel. Then click the Allow button to complete the installation.

After installing the bot, you will receive a Bot User OAuth Access Token for your application. Copy this token as it will be used to perform actions in the workspace.

How to get Slack token
Go to TOP

How to add App into a channel

Finally, add the new bot to a channel inside your workspace. If you haven't created a channel yet, use the #general channel, which is created by default in your Slack workspace. Find the app in the Apps section of the Slack client navigation bar and click on it. Then open the Details menu in the upper right corner. If your Slack client is not in full screen mode, the icon for this menu will appear as an i inside a circle.

To complete adding your app to the channel, click the More button with the three dots icon on the details page and select Add this app to a channel.... Enter the name of the channel in the modal window that will open and click Add.

You have successfully created an app and added it to a feed in your Slack workspace.

Go to TOP

Use Slack APP with HAProxy-WI


Read how to install Checkerhere

After you got the Token you have to create a channel.

Add your Token and channel name on the "Checker" tab:

HAProxy-WI checker

In the end activate Checker for services:

HAProxy-WI checker
Go to TOP

Checker history

Also after enabling checker for servers HAProxy-WI starts collect incident history. It can help in future debuging:

HAProxy-WI checker history
Go to TOP

Was this article helpful?

Yes, thanks!
Not really
Go back