Giter Site home page Giter Site logo

dnac-events-demo's Introduction

Cisco DNA Center Platform Example

Cisco DNA Center assurance has a powerful network correlation engine to generate network issues or events. Cisco DNA Center platform can be used to post these events to a webhook.

The server module is an example of this.

To simulate events coming into the server (so you do not need to break your network) the client program can be used to send some mock data.

Running the server

Install the requirements and then the server can be run as follows

./server.py 
 * Serving Flask app "server" (lazy loading)
 * Environment: production
   WARNING: Do not use the development server in a production environment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on https://0.0.0.0:9000/ (Press CTRL+C to quit)

You can change the port number in the server.py module. If you change the server you will also need to change the client.

NOTE: THe server needs to be running https in order for Cisco DNA Center to communicate with it. I have used an adhoc SSL context in the sample code

Running the client

If you run the client with no arguments, a list of valid options will be displayed, including the available examples

/client.py 
Run with --event and a valid example.
Valid Examples:ap_down_eg, ap_flap_eg, border_dhcp_eg, device_unreachable_eg, swim_eg

When run with a valid example, the example payload it sent to the server to be processed.

./client.py --event device_unreachable_eg
Sending:device_unreachable_eg
200

NOTE: With the move to realtime notifcations, the schema for events has changed. Any examples with a "new" string are real time examples. The server will handle both.

You can check the server logs to see the event being received.

dnac-events-demo's People

Contributors

aradford123 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.