Community discussions

MikroTik App
 
daggerCVN
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 51
Joined: Thu Jan 30, 2014 5:05 pm

Help with XML batch scripting to import devices

Mon May 21, 2018 4:20 pm

Hi all, I have over 1K RB750Gs deployed where each are connected to the internet via a cable modem. I use dynamic DNS to manage their (changing) IP addresses and thus must use a host name versus a static IP address to identify and import the routers. From searches on this site there appears to be no easy/built-in way to import a large number of Mikrotik devices into Dude (and I see this is on the feature request list for 6.x). I can't use the Discovery process as these routers are all over the country on many, many different large IP scopes owned by the cable companies and as noted above I need to use dynamic host naming and not a static IP address. I did see a thread whereby a device was imported, and then a copy of the device creates an XML file. If you then change the appropriate fields in this XML file and then drop it back into the Devices list, it will add the new device (dynamic host name works). I am not an XML scripting expert and doing Web searches hasn't resulted in something I have the skills nor tools at the moment to use. So, I'm asking this community if someone has already written a similar batch script (a For loop that takes the ID of a Mikrotik router from one file, and inserts it into the appropriate locations in a device XML file and concatenates that new XML code to old file, etc) they could share, or perhaps a guidance on how to create this script to a accomplish this task? Thanks in advance.

Who is online

Users browsing this forum: Amazon [Bot] and 69 guests