Monitoring / Alerting Channels
Send alerts to a Slack channel
Create a Slack incoming webhook, then connect it to an ITVA Slack channel so incident notifications post to your team.
ITVA posts notifications to Slack through an incoming webhook URL. You create the URL in Slack, then add it to a Slack channel in ITVA. By the end of this page, a test message from ITVA shows in your Slack channel.
Before you begin
- You need permission to install apps in your Slack workspace.
- If the alerts go to a private Slack channel, you must be a member of that channel.
- You need access to the Settings > Alerting page in ITVA.
Create the webhook in Slack
Caution: the webhook URL contains a secret. Anyone who has the URL can post to the Slack channel. Do not put the URL in tickets, chat messages, shared documents, or source code.
Each webhook posts to one Slack channel. If you use GovSlack, use the slack-gov.com domain instead of slack.com in the first step.
- Go to api.slack.com/apps.
- Select Create an app.
- Enter a name for the app, for example "ITVA alerts".
- Select the workspace that has the channel for the alerts.
- Select Create.
- On the app settings page, select Incoming Webhooks.
- Turn on Activate Incoming Webhooks.
- Select Add New Webhook to Workspace.
- Select the channel that will receive the alerts.
- Select Authorize.
- Under Webhook URLs for Your Workspace, copy the new URL.
Add the channel in ITVA
- Go to Settings > Alerting.
- In the Channels card, select New Channel.
- Enter a Name that says where the alerts go, for example "Network team in Slack".
- Under Kind, select Slack.
- Paste the webhook URL into Webhook URL.
- Select Save.
ITVA accepts only URLs that start with https://hooks.slack.com/ or https://hooks.slack-gov.com/.
The channel sends nothing until an alerting rule uses it in an escalation level.
What the notification looks like
ITVA posts each notification to the webhook URL as a Slack message. A notification for a new incident shows the incident number, the incident message, the priority, and the status. It also has a View Incident link.
ITVA escapes Slack control sequences such as <!channel>. These sequences show as plain text and do not notify the whole channel.
Check that it worked
- In the Channels card, open the channel.
- Select Test Channel.
ITVA shows "A test message has been sent." The Slack channel shows the text "This is an automated test of the ITVA system. No action is required."
Troubleshooting
When Slack rejects a notification, the error in ITVA includes the error code from Slack. To replace a URL, open the channel in ITVA and select Edit Channel.
ITVA does not save the channel
The error "Must be a Slack incoming webhook URL." means that the URL does not start with a Slack webhook address. Copy the URL again from Webhook URLs for Your Workspace in your Slack app settings.
no_service
The webhook is disabled, removed, or invalid. Create a new webhook in Slack, then replace the URL in ITVA.
channel_is_archived
The Slack channel is archived. Unarchive the channel in Slack. As an alternative, create a webhook for a different channel and replace the URL in ITVA.
action_prohibited or posting_to_general_channel_denied
A Slack administrator restricted this type of posting, or the person who created the webhook cannot post to #general. Ask your Slack administrator to change the restriction. As an alternative, create a webhook for a different channel and replace the URL in ITVA.
request failed
ITVA could not connect to Slack, or Slack did not reply within 10 seconds. Select Test Channel again. If the error continues, contact support.