Slack Integration
13 min
integrate nile alerts with slack nile can deliver alert notifications to a slack channel using a slack incoming webhook you create the webhook in slack, add it as a webhook integration in the nile portal, and then enable the alert categories you want delivered overview nile alert → slack incoming webhook → slack channel slack is configured as a webhook destination in the nile portal no api calls or scripting are required if you also send alerts to another system such as servicenow, that is configured as a separate webhook destination with its own subscriptions prerequisites administrator rights to the nile portal permission to create apps and incoming webhooks in your slack workspace the slack channel that should receive nile alert notifications treat the slack webhook url as a secret anyone with the url can post to the channel do not publish it, commit it to source control, or include it in support tickets step 1 create a slack incoming webhook sign in to slack and go to https //api slack com/apps any apps already created in your account are listed here click create new app , or open an existing app used for alert notifications enter an app name, select the target slack workspace, and click create app under features , click incoming webhooks and toggle the feature on click add new webhook to workspace select the channel that should receive nile alerts, then click allow copy the generated webhook url and store it securely an incoming webhook posts only to the channel selected during authorization to deliver alerts to more than one channel, add a separate incoming webhook for each channel a single slack app can hold multiple webhooks step 2 add the slack webhook to the nile portal log in to the nile portal with an administrator account navigate to global settings > integrations click the + icon to add a webhook complete the following webhook details and click save to confirm that the new destination appears in the integrations list field value name a descriptive name for the destination, for example slack network operations url the slack incoming webhook url copied in step 1 token leave empty slack incoming webhook urls already carry the authorization slack requires repeat these steps for each slack channel that needs its own destination step 3 enable alert subscriptions in the nile portal, go to global settings > integrations > setup integration select webhook as the delivery method enable the alert categories you want delivered to slack available alert categories are nile infrastructure nile service — service availability, coverage, and capacity infrastructure — dhcp, dns, radius, and internet availability application — application availability and latency security — wireless intrusion detection my nile incidents client devices subscription selections are saved automatically only alerts that are visible in the nile portal are eligible for subscription webhook subscriptions apply to the destination, whereas email alert subscriptions are per administrator and must be enabled by each admin individually notification behavior nile notifies slack when an alert is created and again when it is resolved repeat notifications for an alert that stays open depend on its severity nile classifies alerts into four severity levels severity meaning severity 1 critical issues requiring immediate attention severity 2 high priority issues severity 3 moderate priority issues severity 4 low priority or informational alerts for a severity 1 alert, nile follows an escalating notification schedule an initial notification when the alert is triggered, then at 2, 6, 14, 24, 48, 72, 96, and 120 hours, and every 24 hours after that until the alert is resolved severity 1 alerts that are already open continue to notify every 24 hours for severity 2, 3, and 4 alerts, a single notification is sent when the alert is first triggered no repeat notifications are sent, and repeat notifications are not sent for lower severity alerts that are already open this severity based approach keeps critical issues visible while limiting overall notification volume what the notification contains each notification is delivered as a json body that slack renders in the channel the notification includes field description alert id unique identifier for the alert alert status whether the alert was created or resolved alert subject short alert title, including the alert type alert summary description of the detected condition severity severity level of the alert start time when the condition was first detected duration how long the condition has been active location site, building, floor, and closet where the condition was detected device name nile element name, including a custom hostname if one is configured device type type of nile element serial number serial number of the nile element device id nile generated identifier for correlation in downstream systems severity, device type, serial number, device id, and custom element name are exposed as dedicated fields to simplify parsing in downstream systems if you configure a custom hostname for a nile element, that hostname appears in webhook notifications, which helps align alerts with your internal naming conventions verify the integration in the nile portal, open the slack webhook configuration and click test connection this validates that the endpoint is reachable and that the receiving system accepts the payload confirm that the test message arrives in the intended slack channel go to alerts and open the alerts list to confirm that nile is generating alerts in a subscribed category confirm that a new alert in a subscribed category produces a slack message confirm that resolving the alert produces a follow up notification confirm that the slack message contains no credentials or other sensitive values run the test connection before relying on the integration for production workflows troubleshooting no slack message is received use test connection in the nile portal to confirm the endpoint is reachable confirm the webhook url was copied in full and has not been revoked in slack confirm the slack app is still installed in the workspace and authorized for the channel confirm at least one alert category is enabled for the webhook delivery method confirm the alert you expected belongs to an enabled category for severity 2, 3, and 4 alerts, remember that only one notification is sent per alert
