Note: Any spaces in the text portion of the URL, the message you wish to send should contain no gaps.
Use the ‘+’ symbol for spaces!!
You can add time for example.
:local sub1 ([/system clock get time])
:local sub2 ([/system clock get date])
/tool fetch "https://api.telegram.org/bot<yourtokencode>/sendMessage\?chat_id=<botcode>&text=Router+went+offline+at+@sub1+on+$sub2"
QUESTION: How do I also use keep-result=no in the script, as is done in the first example? I tried it after the word fetch and at the end after the last entry, neither worked and both prevented the script from working.
The one thing I would like to add from the first example to my script is this
How do I also use keep-result=no in the script, as is done in the first example? I tried it after the word fetch and at the end after the last entry sub2" - neither worked and both prevented the script from working.
I am a new user here. So please forgive me if im posting in the wrong topic / section but:
I have a set of servers behind my Mikrotik RB2011UiAS-2HnD-IN. On top of that i have UPS with USB connection.
I would like to connect the UPS to the Mikrotik and when there is battery critical (low) event then the RouterOs will send pakets to all the servers informing them to shutdown gracefully and when power is back on mains, send them wake-on-lan magic packets.
I do know about Mikrotik UPS package however its functionality is pretty limited.
Any suggestions / help is more than welcome.
Also i do not know about scripting in RouterOS - maybe some good articles / tutorials would also help a lot.
(I am a programmer by profession).