cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
499
Views
5
Helpful
2
Replies

Cisco DNA Event driven task

Eric Greco
Level 1
Level 1

I would like to be able to have DNA run commands using command runner with an issues pops up.  As an example if DNA sees   " Netwrok Device Interface Connectivity - EIGRP Adjacency Failure " I would like it to run some show commands and email me the output of the commands.

2 Replies 2

Johnson Li
Cisco Employee
Cisco Employee

Hi, Eric

 

First of all, I totally understand what you need.

For now, I believe "run some show commands and email the output of the commands" is not originally supported in DNA Center.

As a solution, I recommend you as below:

1, Use the "Events Subscription" in DNA Center:

Navigate to Platform->Developer Toolkit->Events, Search "EIGRP" like this:
Snipaste_2022-04-15_14-38-10.png
And click the "Subscribe" button, there are several subscription types, you can choose the EMAIL type and fill in the required section. One important thing is-SMTP Settings.
For the SMTP settings, please refer to this guide:
After these settings are done, now you will receive the email notification when there are EIGRP Adjacency down issue.
 
2, Leverage supported API in DNAC:
Use the Python script to perform show command in the device, as you know DNAC support API calls.
Here is an example code you can try to get some show command in your device:

GitHub - cisco-en-programmability/dnacenter_command_runner: Cisco DNA Center Command Runner APIs sample code

 
Besides, you can try to write a code with the function you need, for the API calls supported in DNAC, you can refer to below:
 
Thanks,
Johnson.L

Thanks.  I currently am subscribed to the EIGRP alerts.  It would just be nice if there was a way within DNA to trigger commands.  In other words when DNA sees EIGRP adjacency failed that it could be setup to kick off a set of show commands and email the results.