This guide will help you to import range, IP or device data that is contained in spreadsheets, comma, colon or tab separated.
There are a few options/methods available.
- It is possible to import range or IP data via the mmcmd CLI. Please refer to this chapter in the Implementation Guide for details
- It is possible to copy and paste record data (tab separated) into a single DNS Zone, as discussed here
- It is possible to import zones via the File>Import Zone menu item. This is described here
- It is possible to write a custom script to import the data using the SOAP API
- It is possible to use the method described in this article to import range, IP and device data
Installing the Import Data web task
- Download the files for the Import Data web task: ImportData-1.3.zip
- Unzip the file from step 1 and move the MM directory in it over to the server hosting the Men & Mice web interface
- Change to the directory where the Web Interface was installed, e.g. on Windows the default is C:\Program Files\Men and Mice\Web Interface\web
- Create the directory "Custom" if it doesn't already exist, and put the MM directory from step 2 in this folder
- Login to the M&M Web UI as M&M built-in user "administrator". Click on "Tasks" on the left and click the install button in the screen
- Provide the following parameters, and click OK
name: Import Data
Now the "administrator" has access to this new web task, "Import Data", which appears under the "Tasks" node on the left in the web interface. To give more users access to this task, use Tools>Global Access. A new access item will have appeared at the bottom for the web task.
Importing data using the Import Data web task
The web task recognizes tab, comma and colon separated data. When cells are copied in Excel they are by default tab separated. Therefore, the most convenient way to use the task is to copy cells or columns in Excel, and pasting into the web task.
The spreadsheet, or at least the part of it being copied, needs to be in a specific format.
- The first line needs to be the header line, containing the names of the attributes or custom properties in Men and Mice for which the column contains data for
- At least one of the columns must identify the name of the object being imported.
- To import ranges one column must be called Range, and contain the range in CIDR notation for each row. E.g. 192.168.1.0/24
- To import IP addresses one column must be called Address, and contain the IP addresses for each row
- To import Interfaces and/or devices, there must be columns Interface and Device, respectively, containing names of the devices and interfaces in each row
Example of a properly formatted spreadsheet for Range import
|192.168.18.0/24||My title||my description||user1|
|22.214.171.124/25||the title is here||ds||user2|
This would create or update the ranges mentioned in the "range" column, with the property values for Title, Description and Owner in the other columns.
Example of a properly formatted spreadsheet for IP Address import
This would update the IP Addresses in the address column with the property values for "Device Type" and "Owner", and set the Claimed flag as well for those IPs.
Example of properly formatted spreadsheet for importing Devices and Interfaces
This would create or update the devices and their interfaces mentioned in the columns "device" and "interface", and the custom property values "Owner" and "Purpose". The eth0 interface on the first device is also linked to the two addresses in that cell.
Here is a simple demonstration of the workflow when importing the ranges in the example spreadsheet above.