Leveraging APIs and Python to Deliver Troubleshooting and Analytic Data for Cloud Wi-Fi Platforms
This example is with Meraki, but Mist is very similar
Note: My guide and notes are below. I’m dropping a plug for the CPNAE course from CWNP.com. There are great resources to learn Python, but this course contains friendly basic handholding I wish I could have taken first. I do not get any kickbacks this endorsement.
Executive Summary
With the new cloud platforms, the promise for faster troubleshooting and analytics is with Application Programming Interfaces (APIs) and computer coding, like Python. Leveraging scripts provides fast insight beyond the basis provided by the Meraki platform. Graphical User Interfaces (GUIs) are nice, but they don’t necessarily have data required by management, and they don’t necessarily have the right queries for fast data. This document highlights the use of Python Code to show out of compliance software on Meraki Access Points (APs) in need up an update, as well as information to show the switch infrastructure points of interest. This information will highlight the procedures used to implement Python on a PC and use of, “meraki-health-check,” and a couple highlights of the Excel spreadsheet tabs the code produces.
The code in use for this example is the, “meraki-health-check” found at: https://developer.cisco.com/codeexchange/github/repo/obrigg/meraki-health-check/
(*note, this may be based on older Python code— you may have to troubleshoot a bit).
Here’s a bunch of code I wrote with ChatGPT you are welcome to use, too- the steps are the same.
jadexing/Merakicode: Code for Meraki Wi-Fi
Summary of the Steps:
1) Generate your personal Meraki API Key
2) Install Python
3) Set your “Environment Variables”
4) Download API Code
5) Open Powershell, Run as Administrator & Navigate to the Software Location
6) Run the Code
7) Resolve issues presented in the file created by the code
a) Identifying Code to Upgrade
b) Channel Utilization Tab (and other great information)
To run this code, you must perform the following steps:
1) Generate your personal Meraki API Key
Cisco Meraki Dashboard API - Cisco Meraki
2) Install Python
Download Python | Python.org
3) Set your “Environment Variables.” Some code requires a text file of your API key in the same folder as the code. This code will prompt you for your key.
Getting Your API Key - Meraki-CLI Documentation
4) Download Code, create a file to place working code
5) Open PowerShell, Run as Administrator & Navigate to the Software Location
6) Run the Code
The code runs, and the code author presents screen code feedback.
Within your Windows file structure, you find an Excel Spreadsheet.
The health script provides several tabs that are very helpful to targeting and determining the health of a Meraki wi-Fi network. The focus is to update the firmware.
a) Identifying Code to Upgrade
Provided Tabs:
-Introduction (definition of tabs)
-Summary
-Organization Admin
-Network Health Alerts
-Network Firmware
-Channel Utilization
-Switch port counters (only available with Meraki switches)
-RF Profiles
The code produced the “Network Firmware,” tab that shows the Sky Mountain University is behind on code. This is not ideal for the University that needs to update code to fix some known bugs, one of which is a, “Fetch” file issue. The AP stopped connecting to the Meraki cloud, so changes initialized in the cloud could not be pushed down the AP. The code upgrade fixed this issue.
Through scheduled maintenance windows, the code was upgraded, and the “Fetch” file issue resolved. The file shows the data as orange, because the, “Latest Stable Version,” is “MR 29.5.1,” but the MR 29.6.1 was required for the bug.
b) Channel Utilization Tab (and other great information)
The data presented in this tab is fantastic as it shows the weakness in the infrastructure in a report that makes a list of areas and data switches needing support and assistance. For spreadsheet line 107, with this information, we took a spectrum reading and identified with the Wi-Fi users of the area that specific equipment sets off electro magnetic interference and the Wi-Fi is going to degrade in reliability. For the duplex errors, a list of information was provided to the Network Manager to look into connections and equipment, as well as the Power listing in low mode.
In summary, API coding is a way to bring massive power to the existing Meraki platform. This will help the Wi-Fi Engineer quickly find and address issues.




