https://github.com/ecoen66/merakicat
Catalyst to Meraki migration tool and bot
https://github.com/ecoen66/merakicat
catalyst cisco cloud-management cloud-monitoring configuration meraki migration-tool translation-tool
Last synced: 4 months ago
JSON representation
Catalyst to Meraki migration tool and bot
- Host: GitHub
- URL: https://github.com/ecoen66/merakicat
- Owner: ecoen66
- License: mit
- Created: 2024-02-28T01:41:15.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-23T22:29:18.000Z (8 months ago)
- Last Synced: 2025-06-02T19:49:44.153Z (6 months ago)
- Topics: catalyst, cisco, cloud-management, cloud-monitoring, configuration, meraki, migration-tool, translation-tool
- Language: Python
- Homepage: https://cs.co/merakicat
- Size: 21.3 MB
- Stars: 13
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
- Contributing: CONTRIBUTING.rst
- License: LICENSE
- Authors: AUTHORS.rst
Awesome Lists containing this project
README
[](https://developer.cisco.com/codeexchange/github/repo/ecoen66/merakicat)
#  merakicat
This package makes migrating [Cisco](https://www.cisco.com) Catalyst switches to [Meraki](https:www.meraki.com) Dashboard much easier. #merakicat

This Python app can be run in Webex Teams [Bot mode](#Bot) or in [command-line mode](#command-line). It can also be called from shell scripts for [bulk-mode](#bulk-mode).
Below is the list of configurations the tool can currently translate:
switch:
- Hostname
- Spanning Tree RSTP
- Stack
- Static Routing
port:
- Port Description
- Port Status
- Port Speed
- Port Duplex
- Port Type
- PoE Enabled
- Allowed VLANs
- Data VLAN
- Voice VLAN
- Private VLAN
- Layer 3 Interface
- STP RootGuard
- STP Loop Guard
- STP BPDU Guard
- Etherchannel LACP
- NM Ports
Once installed, you can print the entire index of the feature encyclopedia, or to print the index based on either supported and translatable items or both, enter:
```
cd src/merakicat
python mc_pedia [support] [translatable]
```
# Prerequisites for using in Bot mode
If you don't already have a [Webex Teams](https://www.webex.com/products/teams/index.html) account, go ahead and [register](https://www.webex.com/pricing/free-trial.html) for one. They are free.
1. You'll need to start by adding your Bot to the Webex Teams website.
[https://developer.webex.com/my-apps](https://developer.webex.com/my-apps)
1. Click **Create a New App**

1. Click **Create a Bot**.

2. Fill out all the details about your Bot. You'll need to set a name, username, icon (either upload one or choose a sample), and provide a description.

3. Click **Add Bot**.
1. On the Congratulations screen, make sure to copy the *Bot's Access Token*, you will need this in a second.

# Installation
> Python 3.11+ is recommended.
- Clone the github repository and install the requirements
```
git clone https://github.com/ecoen66/merakicat
cd merakicat
pip install -r requirements_dev.txt
```
# Usage
- The easiest way to use this module is to set a few environment variables
> Note: As an alternative, you may edit the variables in mc_user_info.py. Although more convenient, it is less secure.
```
# These exports are used for Webex bot mode:
export TEAMS_BOT_TOKEN=
export TEAMS_BOT_EMAIL=
export TEAMS_BOT_APP_NAME=
export TEAMS_EMAILS=
# These exports are required regardless of mode:
export IOS_USERNAME=
export IOS_PASSWORD=
export IOS_SECRET=
export IOS_PORT=
export MERAKI_API_KEY=
export MERAKI_ORG_NAME =
```
In addition to these settings, various debugs and a choice of PDF vs. DOCX report format can be enabled in the mc_user_info.py file.
> Note: For PDF report generation, MS Word must be installed on the host with merakicat.
# Bot
To run merakicat as a Bot, just start it without any parameters:
```
cd src/merakicat
python merakicat.py
```
**Bot commands include the following:**
Check a Catalyst switch config for both translatable and possible Meraki features:
```
check [host | file ] [with timing] [with details]
```
Check one or more Catalyst switch config files for both translatable and possible Meraki features:
```
check [with timing] [with details]
```
Check the configs of cloud monitored Catalyst switches for both translatable and possible Meraki features:
```
check network [with timing] [with details]
```
Register a Catalyst switch to the Meraki Dashboard:
```
register [host ] [with timing]
```
Claim Catalyst switches to a Meraki Network:
```
claim [] [to ] [with timing]
```
Translate a Catalyst switch config from a file or host to claimed Meraki serial numbers:
```
translate [host | file ] [to ] [with timing]
```
Migrate a Catalyst switch to a Meraki switch - register, claim & translate:
```
migrate [host ] [to ] [with timing]
```
Create a demo report for all features currently in the feature encyclopedia:
```
demo report
```
# Command-line
To run merakicat from the command-line (or from a shell script), enter any of the following:
Check a Catalyst switch config for both translatable and possible Meraki features:
```
cd src/merakicat
python merakicat.py check host | file [with timing] [with details]
```
Check the configs of cloud monitored Catalyst switches for both translatable and possible Meraki features:
```
cd src/merakicat
python merakicat.py check network [with timing] [with details]
```
Register a Catalyst switch or stack to the Meraki Dashboard:
```
cd src/merakicat
python merakicat.py register host [with timing]
```
Claim Catalyst switches to a Meraki Network:
```
cd src/merakicat
python merakicat.py claim to [with timing]
```
Translate a Catalyst switch or stack config from a file or host to claimed Meraki serial numbers:
```
cd src/merakicat
python merakicat.py translate host | file to [with timing]
```
Migrate a Catalyst switch to a Meraki switch - register, claim & translate:
```
cd src/merakicat
python merakicat.py migrate host to [with timing]
```
Create a demo report for all features currently in the feature encyclopedia:
```
cd src/merakicat
python merakicat.py demo report
```
# Bulk-mode
To run merakicat in bulk-mode, create a shell script to call merakicat in command line mode. Example scripts included in the repo are:
Generate Check config reports for a list of Catalyst switches, 20 switches at a time, until the entire list is exhausted. The list is provided in an input file, one hostname/fqdn/IP address per line:
```
cd src/merakicat
bulk_check.sh
```
Migrate a list of Catalyst switches to a Meraki network, 20 switches at a time, until the entire list is exhausted. The list is provided in an input file, one hostname/fqdn/IP address per line:
```
cd src/merakicat
bulk_migrate.sh
```
# Donations
If you found this repo to be useful, please consider donating to Life Decisions, Rockford, IL through a purchase from the [Merakicat store](https://bonfire.com/store/merakicat).
# Credits
**This project is _heavily_ based on the work of others:**
`Catalyst_to_Meraki_Migration_Tool` by [Fady Sharobeem](https://github.com/fadysharobeem).
`Catalyst_2_Meraki_Config_Checker` by [Fady Sharobeem](https://github.com/fadysharobeem).
The bot functionality is using `webex_bot` by [Finbarr Brady](https://github.com/fbradyirl).