https://mikrotik.com/testdocs/ros/2.8/appex/scripting1.php https://www.mikrotik-routeros.com/2010/12/simple-routeros-http-loadbandwidth-tester/
TBD
https://forum.mikrotik.com/viewtopic.php?f=2&t=104266&p=645201#p645201
/ping size=1400 address=root.cz
[admin@mt-test] /tool> fetch address=192.168.88.2 src-path=conf.rsc \
user=admin mode=ftp password=123 dst-path=123.rsc upload=yes
Another file download example that demonstrates the usage of url property.
[admin@test_host] /> /tool fetch url="http://www.mikrotik.com/img/netaddresses2.pdf" mode=http
status: finished
[admin@test_host] /> /file print
# NAME TYPE SIZE CREATION-TIME
...
5 netaddresses2.pdf .pdf file 11547 jun/01/2010 11:59:51
Sending information to a remote host
It is possible to use HTTP POST request to send information to a remote server, that is prepared to accept it. In the following example, we send geographic coordinates to a PHP page:
/tool fetch http-method=post http-content-type="application/json" http-data="{\"lat\":\"56.12\",\"lon\":\"25.12\"}" url="http://testserver.lv/index.php"
:local sysname [/system identity get name]
:local CurDate [/system clock get date]
:local CurTime [/system clock get time]
:local Interface "Interface_Name"
:local LinkName "Link_Description"
:local ifspeed "GET_DESIRED_INTERFACE_SPEED"
#Email
/tool e-mail send to="YourEmail@email.com" subject="$StatusTraffic speed is more then $DSpeed at $CurTime $CurDate" body="Device : $sysname
Date : $CurDate
Time : $CurTime
/interface ethernet monitor ether2 once do={
:if ($"status" != "link-ok") do={ :log info "ether2 is WITHOUT LINK"};
:if ($"auto-negotiation" != "done") do={ :log info "ether2 auto-negotiation NOT WORKING"};
:if ($"rate" != "100Mbps") do={ :log info "ether2 is NOT 100Mbps"};
:if ($"full-duplex" = "no") do={ :log info "ether2 is NOT Full-Duplex"};
}