11-01-2023 03:24 AM
Has anyone had any success getting DNAC to alert to Slack via HTTP POST? Everything setup as per the documentation but nothing arrives in the Slack channel. I am able to use curl successfully proving the incoming webhook is OK, but no luck from DNAC. (Email alerting working fine) Also can see from a pcap the traffic with healthy handshake and stream etc... leaving our network and coming back (although encrypted with TLS) but no idea how to get any helpful logging information from DNAC as to what the response is from the Slack side.. any ideas?
02-05-2024 03:19 PM
I actually have a ticket open with tac for further information on this, but I believe this is because slack cannot directly digest the JSON payload that dnac is sending. If that is the case, we'd need to send the payload from dnac to a webhook receiver, then re-format it and send to slack. You can use the tool https://webhook.site in order to obtain a sample dnac payload. https://api.slack.com/messaging/webhooks has an example of what slack wants in terms of formatting. So believe it mainly comes down to using the "text:" key in the payload.
02-06-2024 10:57 PM
Slack requires a specific format for JSON which is this that Cisco Catalyst Center does not currently support:
Sending messages using Incoming Webhooks
https://api.slack.com/messaging/webhooks
POST https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
Content-type: application/json
{
"text": "Hello, world."
}
There is an alternative to still get notifications in slack which is to make use of the Notification via email option when configuring the Event Notification. Configure a slack email using this guide from slack then use that email to configure the Destination Email in Cisco Catalyst Center
Please see the following guide on configuring the Slack email for a specific channel:
https://slack.com/help/articles/206819278-Send-emails-to-Slack
For Example:
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide