This project is a Proof of Concept (PoC) for the use of webhooks with Cisco SDN solutions, specifically integrating with Cisco Catalyst Center. It leverages a Flask application to receive and process webhook notifications in real-time, showcasing how events from the Cisco Catalyst Center can be handled programmatically.
Webhook Receiver Up | Webhook Receiver Down |
---|---|
![]() |
![]() |
$ git clone https://github.com/Tes3awy/cisco-catalyst-center-webhooks.git
$ cd cisco-catalyst-center-webhooks
$ python -m venv .venv $ source .venv/bin/activate . # On Windows, use `.\.venv\Scripts\Activate.ps1` in powershell (.venv)$
Linux
$ sudo apt update && sudo apt upgrade -y
$ sudo apt install sqlite3 -y
$ sqlite3 --version
Windows
Follow this tutorial
(.venv)$ pip install -r requirements.txt
Create a .env
file in the root directory and add the following:
BASIC_AUTH_USERNAME="USERNAME" BASIC_AUTH_PASSWORD="PASSWORD"
(.venv)$ flask run * Serving Flask app 'run' * Debug mode: on WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. * Running on all addresses (0.0.0.0) * Running on https://127.0.0.1:5443 Press CTRL+C to quit * Restarting with stat * Debugger is active! * Debugger PIN: 419-253-304 ***** Copy Headers for Cisco Catalyst Center Webhook ***** Authorization: Basic YWRtaW46Q2lzY28hMjM0NQ== Content-Type: application/json ***** Copy Headers for Cisco Catalyst Center Webhook *****
https://<ip_address>:5443/api/v1/webhook
.Content-Type: application/json
Authorization: Basic <BASE64 of username:password>
Once the application is running, it will listen for webhook notifications from Cisco Catalyst Center. When a notification is received, it will be displayed on the dashboard in real-time.
This project can be used to monitor and respond to events from Cisco Catalyst Center in real-time. For example, you can use it to:
Check the Flask application logs in the terminal for errors and/or warnings.
This project was written and is maintained by the following individuals:
Contributions are welcome! Please open an issue or submit a pull request with improvements or bug fixes.
Owner
Contributors
Categories
Products
Catalyst CenterCatalyst SwitchesIOS XEProgramming Languages
PythonJavaScriptLicense
Code Exchange Community
Get help, share code, and collaborate with other developers in the Code Exchange community.View Community