Community discussions

MikroTik App
 
User avatar
migotom
just joined
Topic Author
Posts: 14
Joined: Tue Feb 26, 2019 5:08 pm

MT-bulk v2.3.1 Mikrotik automate and send mass commands +REST API

Wed Feb 27, 2019 1:20 pm

Hi,

I wrote simple tool for friend's company to help managing many Mikrotik devices. Maybe for some of you this tool will be helpful as well.

MT-bulk allows to fast and asynchronous distribute commands to Mikrotik devices (collected from file, database or just command line) using both SSH and SSL API.

You can download binary releases for Windows(64bit), Linux (32/64bit) and Mac OSX (64bit) from https://github.com/migotom/mt-bulk/releases
Documentation and source code at: https://github.com/migotom/mt-bulk/blob ... /README.md

Keep in mind that development is still and progress, feel free to report any issues or ideas at https://github.com/migotom/mt-bulk/issues

Last release: 2.3.1 viewtopic.php?f=9&t=145850#p848961
Last edited by migotom on Thu Mar 18, 2021 12:16 pm, edited 13 times in total.
 
pikpik
Frequent Visitor
Frequent Visitor
Posts: 80
Joined: Wed Jan 20, 2010 11:25 am

Re: MT-bulk 1.0 Tool to asynchronous parallelisation of operations.

Thu Feb 28, 2019 5:01 pm

How about Windows version ?
 
ofer
Frequent Visitor
Frequent Visitor
Posts: 59
Joined: Wed May 23, 2018 11:45 am

Re: MT-bulk 1.0 Tool to asynchronous parallelisation of operations.

Thu Feb 28, 2019 5:03 pm

How about Windows version ?
I checked and it seems to be written in go so I think it's possible to adapt the source code for windows too or Just boot a Linux VM
 
User avatar
migotom
just joined
Topic Author
Posts: 14
Joined: Tue Feb 26, 2019 5:08 pm

Re: MT-bulk 1.0 Tool to asynchronous parallelisation of operations.

Thu Feb 28, 2019 5:10 pm

How about Windows version ?
I checked and it seems to be written in go so I think it's possible to adapt the source code for windows too or Just boot a Linux VM

That's right. I just prepared version for windows, please test it. https://github.com/migotom/mt-bulk/rele ... .amd64.zip
Latest release always at https://github.com/migotom/mt-bulk/releases
 
User avatar
migotom
just joined
Topic Author
Posts: 14
Joined: Tue Feb 26, 2019 5:08 pm

Re: MT-bulk v1.2 mass command/config update tool

Mon Mar 04, 2019 10:23 am

released version 1.2:
- dropped OpenSSL dependency

released version 1.3:
- added sleep attribute to commands, e.g. sleep = "100ms" (required by some ros commands)

released version 1.4:
- improved SSH sessions handling (better performance and fix for passing additional user input to commands, e.g. passing password)
- added checking for new releases (can be disabled by switch --skip-version-check)
 
User avatar
migotom
just joined
Topic Author
Posts: 14
Joined: Tue Feb 26, 2019 5:08 pm

Re: MT-bulk v1.4 Mikrotik automate and send mass commands

Tue Mar 19, 2019 6:14 pm

released version 1.5 https://github.com/migotom/mt-bulk/releases/tag/v1.5
- option to load custom SSH/API commands from separate config files by --commands-file=<filename> argument
- better error handling and returning error code 1 on any error.
 
ksteink
Frequent Visitor
Frequent Visitor
Posts: 80
Joined: Thu Mar 31, 2016 6:54 pm

Re: MT-bulk v1.5 Mikrotik automate and send mass commands

Wed May 08, 2019 10:52 pm

Any plans for MacOS version?
 
User avatar
migotom
just joined
Topic Author
Posts: 14
Joined: Tue Feb 26, 2019 5:08 pm

Re: MT-bulk v1.5 Mikrotik automate and send mass commands

Thu May 09, 2019 12:26 am

 
User avatar
migotom
just joined
Topic Author
Posts: 14
Joined: Tue Feb 26, 2019 5:08 pm

Re: MT-bulk v2.0 Mikrotik automate and send mass commands +REST API

Wed Oct 16, 2019 5:16 pm

Released version 2.0

https://github.com/migotom/mt-bulk/releases

New features:
  • REST API gateway server `mt-bulk-rest-api` listening for HTTPS requests with type of job/operation to perform on specified host.
    • All request are distributed to worker pool of configurable amount of workers, to avoid race condition request for same IP addresses are always passed to same worker.
    • REST API gateway authenticate request by tokens generated using configurable keys with customized authorization rules.
    • Auth token is valid one hour
  • added support for public key SSH authentication
  • added configurable SSH pty
  • added YAML configuration format (since 2.0 YAML is default format but TOML is still supported)
  • added option to load hosts using toml/yml files with declared credentials per host
Changes:
  • change password operation, added optional user name parameter
  • SSH responses parser fixes (eg. filtering non ASCII characters)
  • added obsolete SSH key exchanges (needed by some older Mikrotik devices, still recommended to upgrade them)
  • added support for RouterOS strong-crypto (`/ip ssh set strong-crypto=yes`)
  • improved `mt-bulk` execution output
  • added configurable connection attempts/retries with increasing backoff time
  • better concurrency model of dividing jobs to workers
  • moved most of command line flags into configuration
  • reorganized examples and documentation
  • redesigned configuration structure (please be aware that configuration from versions 1.x will not work anymore)
  • internal code major refactor
 
Dude2048
Member Candidate
Member Candidate
Posts: 212
Joined: Thu Sep 01, 2016 4:04 pm

Re: MT-bulk v2.0 Mikrotik automate and send mass commands +REST API

Wed Oct 16, 2019 5:26 pm

Looks promising, I will give it a try. One request, can you post a simple yaml config file. It will give me a flying start.
 
User avatar
migotom
just joined
Topic Author
Posts: 14
Joined: Tue Feb 26, 2019 5:08 pm

Re: MT-bulk v2.0 Mikrotik automate and send mass commands +REST API

Wed Oct 16, 2019 5:32 pm

Looks promising, I will give it a try. One request, can you post a simple yaml config file. It will give me a flying start.
You have sample configurations in https://github.com/migotom/mt-bulk/tree ... igurations

Including yaml and toml versions.

PS. Let me know if anything is unclear or missing some examples.
 
Dude2048
Member Candidate
Member Candidate
Posts: 212
Joined: Thu Sep 01, 2016 4:04 pm

Re: MT-bulk v2.0 Mikrotik automate and send mass commands +REST API

Thu Oct 17, 2019 8:10 am

Thanks
 
User avatar
migotom
just joined
Topic Author
Posts: 14
Joined: Tue Feb 26, 2019 5:08 pm

Re: MT-bulk v2.1 Mikrotik automate and send mass commands +REST API

Tue Oct 22, 2019 6:16 pm

Released 2.1

https://github.com/migotom/mt-bulk/releases/tag/v2.1

New features:
  • added system backup operation
  • added sftp operation
  • added simple file server to mt-bulk-rest-api (JSON response includes download_urls for operations like SystemBackup)
Changes:
  • configurable root_directory for mt-bulk-rest-api
  • documentation improvements (including more examples)
  • fixes in parsing SSH output for some Mikrotik devices
  • removed version check errors presenting
  • minor fixes
 
User avatar
migotom
just joined
Topic Author
Posts: 14
Joined: Tue Feb 26, 2019 5:08 pm

Re: MT-bulk v2.2 Mikrotik automate and send mass commands +REST API

Wed Oct 30, 2019 8:54 pm

Released 2.2

https://github.com/migotom/mt-bulk/releases/tag/v2.2

New features:
  • new operation - scan for known vulnerabilities (CVE) and perform security audit
  • added mt-bulk internal key/value based database (used to cache CVE search results and information about new mt-bulk releases)
  • added configurable CVE search API endpoints
  • added option to define in custom ssh/api mode multiple matches for regex parsers of executed commands
Minor changes and fixes:
  • fixed returning multiple errors
  • fixed automatically creating not existing but configured paths
  • fixed paths parsing
  • improved internal tests
  • improved documentation
  • compiled with Go 1.13.3
 
User avatar
migotom
just joined
Topic Author
Posts: 14
Joined: Tue Feb 26, 2019 5:08 pm

Re: MT-bulk v2.2.2 Mikrotik automate and send mass commands +REST API

Sat Nov 02, 2019 1:26 pm

Released 2.2.2

https://github.com/migotom/mt-bulk/releases

Minor changes and fixes:
  • fixed/improved detecting of enabled unsecure services
  • added presenting CVE details and reference URLs (both for CLI and RESTlike API)
  • error handling regression fix
 
User avatar
migotom
just joined
Topic Author
Posts: 14
Joined: Tue Feb 26, 2019 5:08 pm

Re: MT-bulk v2.2.3 Mikrotik automate and send mass commands +REST API

Mon Nov 18, 2019 5:18 pm

Released 2.2.3

https://github.com/migotom/mt-bulk/releases

Minor changes and fixes:
  • fixed strong crypto ssh support for new RouterOS versions
  • fixed ssh support for some edge cases
  • fixed low memory hosts support
  • yaml configuration format fixes
 
User avatar
migotom
just joined
Topic Author
Posts: 14
Joined: Tue Feb 26, 2019 5:08 pm

Re: MT-bulk v2.3.1 Mikrotik automate and send mass commands +REST API

Thu Mar 18, 2021 12:00 pm

Since last post released 2.3 and 2.3.1

https://github.com/migotom/mt-bulk/releases

New features:
  • Added support for parsing hosts from The Dude CSV exports (thanks @tyler-sommer )
Fixes:
  • Fixed #13 (Try next IP on "can't resolve host x.x.x.x") by skipping unresolvable hosts
  • Fixed #15 (new API login method)
  • Fixed error message could occur during certificates creation
.

Who is online

Users browsing this forum: No registered users and 22 guests