Slack alert channel
To send alert notifications from Instana to Slack in real time, create a Slack alert channel shown on this page.
- Creating a Slack alert channel
- Generating Slack Webhook URL
- Alerting examples
- Additional information on Instana Links in Slack app
Creating a Slack alert channel
To create a Slack alert channel in Instana, click Settings > Team Settings > Events & Alerts > Alert Channels > Add Alert Channel in the Instana UI.
- Name - Name of the Alert Channel in Instana
- Webhook URL - Webhook URL generated from user's Slack application (see next section for instructions)
- Icon URL - URL of Icon user choses to show when message is received
- Channel Name - Slack channel name from user's Slack workspace
Generating Slack Webhook URL
To receive Instana alerts in Slack, you need to create a Slack webhook URL. The Slack webhook URL acts as a bridge between Instana and Slack, allowing alerts to be sent directly to a chosen Slack channel. You can create this URL through the Slack web interface or the Slack app for ease of use.
You can generate a Slack webhook URL for Instana alerts to arrive to the specific channel (that is, #test-channel-1) by using one of the following options:
- Personalized Slack app:
- Personalized Slack app is the "modern" approach where you create your own Slack app within your workspace. During the setup, enable the Incoming Webhooks feature. This method offers more flexibility and control over the webhook settings.
- Incoming Webhooks App (Legacy Built-In App):
- According to (Slack's announcement)[https://api.slack.com/legacy/custom-integrations/messaging/webhooks], the Incoming Webhooks App is a legacy custom integration, which is an outdated way for teams to integrate with Slack. These integrations lack newer features and they will be deprecated and possibly removed in the future.
Personalized Slack app
Create your own customized Slack app and enable the Incoming Webhooks feature by completing the following steps. After the app is created, the incoming webhooks must be connected.
- Under the channel's settings, enable incoming webhooks, a Slack extension
- Create an incoming webhook. Pick the channel to send the alert to.
- Copy the URL.
- Use the Incoming Webhooks app (Legacy)
Creating your own Slack app
To create your own Slack app, complete the following steps, starting off by going to the Slack app directory.
-
Click on the Create App button and choose from scratch.
-
Enable the Incoming Webhooks feature in this app.
-
Select the appropriate Slack workspace from the dropdown menu.
-
You can see that a webhook link is generated for a specific channel. Copy this link and insert it to the corresponding Instana Slack alert channel.
For more information, see Create your own Slack app.
Incoming Webhooks app
- Click Browse apps > Custom Integrations > Incoming Webhooks. See the Slack app section for more details.
- If the Slack webhook URL is not specified, the Slack integration posts to the channel that is configured on the Slack side, and you can override the channel and user icon by configuring it on the Instana side.
Alerting examples
After you create the alert channel, alerts for the following events are received as an HTTP POST
to the configured Slack Webhook URL (HTTP or HTTPS), the address which the alerts will be sent to.
See the following examples:
On open issues or incidents
On close issues or incidents
Emoji rendering
In the Slack alert messages, the rendering of emoji is disabled. For example, you can see :wink:
instead of the actual 😉 emoji. This update prevents interference with custom payloads that use the custom:<key>: <value>
format. If you use an emoji name (for example, pod
) for your key, then the key name that is rendered as an emoji in Slack messages is difficult to read.
Additional information on Instana Links in Slack app
Additional information on Instana links in Slack
To get a preview of instana.io
URLs that are sent in Slack, install the Instana Slack app.
Prerequisites
You must have a valid log-in session in Instana during the installation process of the Instana Slack app.
Install
The installation process starts with clicking the Add to Slack button as follows. After you grant access to read:links
and write:links
, you are forwarded to a tenant selection page where you choose
the tenants unfurling should apply to. For all selected tenants, a new API token with the name Slack Token
is generated. This token is used to resolve desired preview information.