How Cisco ACI can easily send real-time notifications straight to your hands

Even if you don’t fully understand what is an API, it is really easy to leverage their power to have some useful information directly sent to a collaboration platform and receive it on your mobile or PC in real-time.

All the tools in use are Free: Python, Slack, and WebEx Teams.

In this post, I will show you how to send Cisco ACI faults and events to messages straight to Slack and WebEx Teams.

With a Python script, we are going to subscribe to the ACI faults and events channel. Then when ACI has a new message it will send it back to the script, and the script will send that message to a collaboration platform like Slack or WebEx Teams. We could also be doing any other kind of action with that information.

Here in the first example, you can see how a fault will be seen on your PC, Cell Phone, or tablet, which means … anywhere anytime!

Later if you add some chatBots you could easily take some action on these messages, forward them to support, start a voice call on the same chat, or even have them searchable for a future reference. Check my other posts about chatBots.

@Cisco WebEx Teams:


For the next one, I will upload a full tenant config to the APIC. You can see the EPGs creation events, and at the end, a fault because one of the interfaces does not exist. (I’m using the Cisco ACI Sandbox).

@Cisco WebEx Teams:


Check the code at GitHub.

Now, this script is running on a server, and the Cisco ACI APIC, allows you to deploy the script inside a small Docker container directly in the APIC. This is awesome because you are avoiding the need of a server to run the script, and we can say that the APIC is sending the message directly to you and without the need for any intermediary monitoring system.

Stop 2 seconds, and think about this… The Cisco ACI API is just another API, we could be using Firepower API, AWS API, Microsoft Teams, WhatsApp, and so on. Even with Slack and WebEx Teams, we are using their APIs. Since all the APIs follow the same structures and methods, if you learn just a bit about how to “talk” to them, you will be able to “talk” with all of them, and in some time, make them “talk” to each other. Which is, in fact, what are we doing here, with some Python code perform a GET from an API for some info, and POST that info into another API. So many new possibilities right?

I hope you enjoyed reading. Don’t hesitate to contact me if you need any help!

Have a good day, Adrián.-

Leave a Reply

Your email address will not be published. Required fields are marked *