Thanks for all the input. I ended up writing a Python script to get this info. See the code below. You just need to add your API Key in the "api_key" constant, as well as the Organization ID of the organization you're querying in the "org_id" constant. I'm sure this could be optimized better, but I'm a little rusty! Enjoy ///////////////////// B E G I N C O D E ////////////////////////////// # Import "meraki" to allow Meraki function calls
from meraki import meraki
# Import "datetime" to get current date and time
# ///////// Start Definition of Script Constants ////////////////
# api_key = Unique API key generated on a per Meraki User basis
# org_id = Unique organization ID of organization you want to query
api_key = '##################'
org_id = '##################'
# Get the current list of networks from your Organization
current_networks = meraki.getnetworklist(api_key, org_id)
# Establish when "now" is, used to create the file name for output
now = datetime.datetime.now()
# Create/Name the output file with year, month, day and hour minutes
filename = now.strftime("%Y-%m-%d %H.%M") + ".txt"
# Open the file for output
f = open(filename,"w+")
# "i" will be used to increment through each "network" in the Organization
i = 0
for i in range(len(current_networks)):
# Output to console the Name and ID of the current network
curr_net_id = current_networks[i]['id']
curr_net_devices = meraki.getnetworkdevices(api_key,curr_net_id)
# Write to the output file the 'name' of the network and add a comma
# Checks for Meraki devices on this network, if there are no devices output to file "No Devices Present"
if len(curr_net_devices) == 0:
f.write("No devices Present")
# "j" will be used to increment through each "device" on this network
j = 0
for j in range(len(curr_net_devices)):
# Output to console the serial number of the device
curr_clients = meraki.getclients(api_key,curr_net_devices[j]['serial'])
# Checks for clients attached to this device, if no clients present output the name, model and serial of the
# device as well as the message "No Clients"
if len(curr_clients) == 0:
# Output to console "No Clients" message
print ("No clients")
# Output to file "name", "model", "serial" of the device as well as "No Clients" message
# "k" will be used to increment the number of clients on each device
k = 0
for k in range(len(curr_clients)):
# Output to console "description" and "mac" of the client
# Output to file "name", "model", "serial" of the device as well as the "description" and "mac"
# of the client
# Increment "k" to move onto next client on current device
k = k + 1
# Increment "j" to move onto next device on current Network
j = j + 1
# Increment "i" to move onto next network in Organization
i = i + 1
# Close the output file
f.close() ///////////////////// E N D C O D E //////////////////////////////////
... View more
Hmm that was what I was afraid of. I already wrote a script that cycles through the 650 networks and checks for new Meraki hardware at each site. If new hardware is found, it gets a few tags added as well as gets a physical address (and moves the pin on the map) from a external csv file. So doing this won't be too much different, a lot of the logic is already in place. Thanks for the prompt response.
... View more
I'm administrating a decent size Meraki Organization, it currently has ~650 networks with every network consisting of a single MX65 and 1-3 MR33's. Is there a Meraki Dashboard report that I can run that will give me a listing of all Clients connected to all networks in that organization? I'd like it to be in an .csv and sorted by Network name. I think I can probably do it via API, but it'd be nicer if I could use something that already exists. Thanks!
... View more
Yeah I talked to our SE and he said API was the way to go as well. I guess I need to dust off my scripting skills (hey it's only been about 16 years!) and dive in. Luckily I'm not the first guy to have to do this, so there is a lot of samples and documentation to help me along. Thanks for the quick responses! Cheers
... View more
Hopefully this is the correct forum, and hopefully someone can give me the answer I'm looking for! I'm currently in the process of a fairly large Meraki roll-out (~3,700 locations). Each location will be a separate "Meraki Network". Each location will get a MX-65 and at a minimum a single MR-33. We have created a Service-Now dashboard (which runs on mobile devices) that allows our field techs to do a network lookup then take a picture of the serial numbers of the MX and MR devices and have them get added to an existing network. This works really, really well and will save all kinds of time (like hundreds of hours). The kicker is we need to create the ~3,700 networks ahead of time. Sounds easy right? Just use the "Bulk Network Creator". The issue is, to use the "Bulk Network Creator" at a minimum you need the "Network Name" (no problem) and the "Serial Number" of the device(s) that will be in the network (here's my problem). Because we have over 7,000+ Meraki devices to install, and these devices can be in possession with any one of a couple dozen field technicians there is no way for me to have this information (what particular device will be at what particular network) ahead of time. Is there any possible way to create ~3,700 Meraki networks WITHOUT knowing the SN of the devices and WITHOUT having to do it manually? Thanks!
... View more