Get log line from memory log

anav say:

Probably yes, most cases I try test step after step.


i. How do I put this in the PUT section below

Like that:

# Check for Power failure
:if ([:find [:tostr $logMessage] "USB UPS AC power off"] != "") do={
:beep frequency=90 length=500ms
:beep frequency=130 length=500ms
:put ("A Power Failure has occurred. Take some action")
: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"
}
# End check for Power Failure



ii. what is the purpose of the beep frequency lines, do I even need them??

:beep do a sound at internal buzzer/speaker.
You not play Super Mario theme at RouterOS ?? Realy ?

Where I would need help is defining the :put command ! I imagine this where I put in the fetch command???

In scripting you must feal the magic of creator, you can put anything anywhere and .. you found that bugs :slight_smile: or success of doing something like you think, or bugs again. This is like loop.

I hope add some info here.
BR Marcin (SiB) Przysowa