GVE Devnet: Cisco Meraki MX Dashboard

Contacts

Solution Components

Solution Overview

The solution creates a flask application that allows to view MX FW rules and download to a csv from a single dashboard.

  1. When initializing the flask application, we immediately make a GET request to the Meraki Dashboard API
  2. The Meraki Dashboard API responds with a list of networks part of the organization
  3. The flask application shows the a list of networks in the organization in a dropdown menu
  4. The user selects a network from the dropdown menu
  5. The flask application makes two GET requests to the Meraki Dashboard API to obtain the L3 firewall rules and policy objects that are part of the network
  6. The Meraki Dashboard API returns both responses
  7. The flask application combines the L3 firewall rules and the policy objects into one table
  8. The flask application shows the table with the firewall rules and the nested IP addresses

The front-end of the application looks as follows:

For details please view "Usage" below.

Installation/Configuration

Clone the repo :

$ git clone (link)

(Optional) Create Virtual Environment :

Initialize a virtual environment

virtualenv venv

Activate the virtual env

Windows venv\Scripts\activate

Linux source venv/bin/activate

Install the libraries :

$ pip install -r requirements.txt

Setup:

Cisco Meraki

Add the Meraki API Key and Organization Id to env_var.py. Generate your meraki api key in order to use the application. You can find instructions on how to generate an API key here:

https://documentation.meraki.com/General_Administration/Other_Topics/Cisco_Meraki_Dashboard_API

Make sure this API key has write access to both the source and target organization. You can add your account as Full Organization Admin to both organizations by following the instructions here:

https://documentation.meraki.com/General_Administration/Managing_Dashboard_Access/Managing_Dashboard_Administrators_and_Permissions.

The config variable is a dictionary.

config = {}

config['api_key'] = "" config['organization_id'] = ""

Usage

Run the flask application:

python main.py

Go to the following url:

https://localhost:8000/

LICENSE

Provided under Cisco Sample Code License, for details see LICENSE

CODE_OF_CONDUCT

Our code of conduct is available here

CONTRIBUTING

See our contributing guidelines here

DISCLAIMER:

Please note: This script is meant for demo purposes only. All tools/ scripts in this repo are released for use "AS IS" without any warranties of any kind, including, but not limited to their installation, use, or performance. Any use of these scripts and tools is at your own risk. There is no guarantee that they have been through thorough testing in a comparable environment and we are not responsible for any damage or data loss incurred with their use.
You are responsible for reviewing and testing any scripts you run thoroughly before use in any non-testing environment.

Use Case

GVE DevNet Meraki MX Dashboard

In this PoV, we created a dashboard that shows the L3 firewall rules with the associated IP addresses per group, instead of just the group number.

White Paper

Provide links to related white papers:

Provide a link to a related DevNet Sandbox: Meraki Always-On Sandbox

Provide links to related Learning Labs or modules on DevNet: Getting Started with Meraki Getting Start with Meraki Dashboard API

Solutions on Ecosystem Exchange

Provide links to related solutions on DevNet Ecosystem Exchange: Perform audits and view historical data

View code on GitHub
  • Owner

  • Contributors

  • Categories

  • Products

    Meraki
  • Programming Languages

    CSS
  • License

    Other

Code Exchange Community

Get help, share code, and collaborate with other developers in the Code Exchange community.View Community
Disclaimer:
Cisco provides Code Exchange for convenience and informational purposes only, with no support of any kind. This page contains information and links from third-party websites that are governed by their own separate terms. Reference to a project or contributor on this page does not imply any affiliation with or endorsement by Cisco.