diff --git a/work/tbx/meraki/meraki_api.md b/work/tbx/meraki/meraki_api.md index 2ce8f90..c688ab2 100644 --- a/work/tbx/meraki/meraki_api.md +++ b/work/tbx/meraki/meraki_api.md @@ -1,3 +1,88 @@ +Here's the organized list of scripts in Markdown format, categorized by functionality and sorted alphabetically within each category for better readability and structure: + +# Descriptions of Scripts in This Repository + +## Network Configuration + +- **addroutes/addroutes.py:** Script to add static routes to a non-template network from a CSV file. +- **asa_cryptomap_converter/cryptomap_converter.py:** Migrate crypto map-based site-to-site VPN configuration to a Meraki MX security appliance. +- **cloneprovision.py:** Mass-provisions MX security appliances as individually managed networks, without using templates. +- **copymxvlans.py:** Export MX VLAN configuration of a source organization to a file and import it to a destination organization. +- **copynetworks.py:** Copies networks and their base attributes from one organization to another. +- **copyswitchcfg.py:** Export switchport configuration of a source organization to a file and import it to a destination organization. +- **deployappliance.py:** Claims a single Security Appliance or Teleworker Gateway into an organization, creates a new network for it, and binds that network to an existing template. +- **deploycustomer.py:** Automates customer account/organization creation for service providers. +- **deploydevices.py:** Claims multiple devices and licenses into an organization, creates a new network for them, and binds that network to an existing template. +- **migrate_cat3k:** Proof of concept script to migrate switchport configuration from Catalyst 3750-X switches to Meraki MS switches. +- **migratecomware.py:** Migrates legacy switch infrastructure based on Comware to Meraki MS switches. +- **migrate_devices:** Moves devices from one organization to another. +- **migrate_networks:** Copies networks from one organization to another. +- **movedevices.py:** Moves all devices from one organization to another. +- **privateApplicationsImport.py:** Imports Meraki Secure Connect private applications from a CSV file into the Meraki Dashboard. +- **provision_sites:** Provisions template-based networks with manually defined VLAN subnets to the Meraki dashboard. +- **removetemplate.py:** Creates a copy of a template-based network that preserves as many settings as possible without relying on a configuration template. +- **setlocation.py:** Sets the street address and optionally the map marker of all devices in a network or organization. +- **setlocation_legacy.py:** Legacy script to set the street address of all devices in a given network. +- **setssidvlanid.py:** Sets the VLAN ID of SSIDs in 'Layer 3 with concentrator' or 'VPN' mode to a value. +- **setSwitchPortOnMacOui.py:** Sets attributes of a switch port if a client with a matching MAC OUI is found connected to it. +- **tag_all_ports.py:** Tags all MS switch ports in an organization with a user-defined tag. +- **update_ports.py:** Finds MS switchports that match input search parameters and changes their configuration. + +## Device Management + +- **android_patch_audit:** Checks the date of the last security patch of Android devices managed by Meraki Systems Manager. +- **audit_client_tracking.py:** Checks if the client tracking method in any of a set of networks is set to a required value. +- **auto-cycle-port:** Checks if devices of a particular model are offline and cycles specific switchports in the same network. +- **auto_reboot:** Reboots devices with a matching device tag once a week. +- **autovpn_tunnel_count.py:** Counts how many VPN tunnels are consumed per network for establishing Auto VPN connectivity to peers. +- **clientcount.py:** Counts the total unique client MAC addresses connected to MR access points for an organization during the last month. +- **clients_in_ip_range.py:** Prints a list of all clients in one or more organizations that belong to a specified IPv4 subnet or address range. +- **deviceupdownstatus.py:** Prints a list of all devices in an organization's inventory along with their current up/down status. +- **find_clients.py:** Finds all clients with descriptions, MAC addresses, or IP addresses including a query string and prints their basic statistics. +- **find_ports.py:** Finds all MS switchports that match the input search parameter and applies new access policies. +- **get_license_info.py:** Prints the license info summary for a specific organization or all organizations an admin has access to. +- **inventorycsv.py:** Creates a list of all Meraki devices in one or all organizations accessible by an administrator. +- **invlist.py:** Creates a list of all serial numbers and models of devices that are part of a Meraki network for an organization. +- **latest_devices.py:** Exports CSV of all in-use devices claimed after a specific date. +- **license_counts_csv.py:** Creates a CSV file with aggregated license info for all co-term organizations accessible by an administrator. +- **listip.py:** Prints the "lanIp" of the device if available. +- **manageadmins.py:** Add, delete, find, and list administrators across organizations. +- **merakidevicecounts.py:** Prints total device counts per device family for all organizations accessed by an admin account. +- **merakilicensealert.py:** Sends an email alert if the remaining license time in any org is less than X days or if its license capacity is insufficient. +- **mi_bom_tool.py:** Counts the numbers and sizes of Meraki Insight licenses needed to cover a set of networks in an organization. +- **RadiusCertSurvey:** Surveys managed devices for updated radius.meraki.com certificates. +- **reboot.py:** Reboots devices using a list of serial numbers. +- **set_client_tracking.py:** Sets the client tracking method of a group of networks to a desired value. + +## Monitoring and Reporting + +- **bssid.py:** Pulls the BSSID of the enabled SSID for all networks in an organization and writes them to a CSV per network. +- **checksubnets.py:** Checks if the LAN IPs of all access points belong to specific IPv4 subnets. +- **CiscoLive/createWebhookTemplate.py:** Creates a custom webhook template. +- **eos_scanner.py:** Scans organizations for devices with announced End of Sales/End of Life dates. +- **getbeacons.py:** Prints a list of all bluetooth beacons in an organization. +- **googletimezonetest.py:** Gets the time zone corresponding to a street address using Google Maps APIs. +- **offline_logging:** Logs data from the Meraki dashboard to a MongoDB database. +- **orgclientscsv.py:** Creates a CSV file with all client devices in an organization. +- **org_subnets.py:** Prints a list of all subnets configured to MX security appliances. +- **postman_collection_generator.py:** Creates a Postman collection for the Meraki Dashboard API v1. +- **remoteAccessLogsAnalyzer.py:** Fetches and analyzes Meraki Secure Connect remote access logs and generates statistics. +- **topusers:** Finds bandwidth hoggers in a network through a web UI. +- **uplink.py:** Exports WAN uplink information to CSV files. +- **usagestats.py:** Produces reports on per user group network usage. +- **usagestats_initconfig.txt:** Example initial configuration file for usagestats.py. +- **usagestats_manual.pdf:** Manual for usagestats.py. + +## Utilities + +- **firmware_lock/firmware_lock.py:** Locks firmware for devices in an organization to desired builds or release trains. +- **mx_firewall_control/mxfirewallcontrol.py:** Displays, modifies, and creates backups of MX Layer 3 firewall rulesets. +- **mx_firewall_control/mxfirewallcontrol_example_input_file.txt:** Example input file for mxfirewallcontrol.py. +- **nodejs_sdk_builder:** Builds a NodeJS SDK for the Meraki Dashboard API. +- **migration_init_file.txt:** Example init config file for migratecomware.py. + +--- + Cisco Meraki organizes its networks and devices in a hierarchical structure that provides a clear and scalable way to manage and monitor your network infrastructure. Understanding this hierarchy is essential for effectively using the Meraki Dashboard and API. Here’s a breakdown of the hierarchy: ## Meraki Hierarchy