Notifying with Slack
Seq can send notifications to a Slack channel when alerts are triggered, and when events are logged.
This is accomplished using Seq.App.Slack, a plug-in developed and maintained on GitHub by David Pfeffer and the Seq community.
![SlackNotification.png 1516](https://files.readme.io/adeba32-SlackNotification.png)
An alert from Seq, sent to a Slack channel.
Installing the App
The first step is to install the plug-in using the instructions here. The package id is Seq.App.Slack.
After the package is downloaded and unpacked, you should see it appear in the list of installed apps:
![SlackNotification1.png 2532](https://files.readme.io/6cc20d6-SlackNotification1.png)
Slack app installed in Seq.
Adding an Instance
The Slack app needs to be configured with details of your Slack server. To do that, select Add Instance next to the app name.
![SlackNotification1b.png 2532](https://files.readme.io/728ffbe-SlackNotification1b.png)
Configuring an instance of the Slack app for Seq.
If you want to stream events directly to Slack, choose Stream incoming events. This isn't necessary, however, if you plan to use Alerts to send notifications.
Check the Slack documentation for how to create a webhook URL.
Once the instance is configured it will appear under the Slack app with some statistics showing events sent and received, and diagnostic events raised:
![SlackNotification2.png 2532](https://files.readme.io/b428356-SlackNotification2.png)
Seq Apps screen showing the Slack app and one running instance.
Linking Back to your Seq Server
The messages sent to Slack by Seq includes a link back to view the event on the Seq server. This uses the address on which Seq is configured to listen - http://localhost:5341 by default.
To set a different address, either set the SEQ_API_CANONICALURI
environment variable to the public address of your Seq server (great for Docker), or use the Seq command-line on Windows to set api.canonicalUri
:
seq config set -k api.canonicalUri -v https://your-seq-server
seq service restart
Updated 12 days ago