cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
494
Views
1
Helpful
2
Replies

Cisco DNA Center & Slack Webhook

angadnsada
Level 1
Level 1

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?

2 Replies 2

loosechanges
Level 1
Level 1

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.

Tomas de Leon
Cisco Employee
Cisco Employee

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:

CatC-to-Slack_using_email.png