Community discussions

MikroTik App

Search found 4 matches

by bara
Fri Mar 07, 2025 11:38 am
Forum: Scripting
Topic: script cannot running if file log.0.txt to big when tried to read each line
Replies: 1
Views: 483

script cannot running if file log.0.txt to big when tried to read each line

halo i have problem when read dan put result from large size of /file log.0.txt this is my script to convert MMM/dd/yyyy to yyyy/mm/dd each line in log.0.txt # Initialize variables :global logFileContents [/file/get ppp_log.0.txt contents] :global logarray [] :global currentLine "" :global...
by bara
Thu Mar 06, 2025 8:31 am
Forum: Scripting
Topic: How to filter logging time 24 hours ago and topics=ppp and message=connected in log.0.txt [SOLVED]
Replies: 4
Views: 5903

Re: How to filter logging time 24 hours ago and topics=ppp and message=connected in log.0.txt [SOLVED]

HI @bara. I have posted a quick and easy solution using current RouterOS versions (>=7.17) for this task here Mikrotik Scripting - Quickly filter Router-Log by datetime Examples for your specific needs: Your entries since "24 hours ago": /log print where (([:timestamp]+([/system clock get...
by bara
Thu Feb 20, 2025 5:18 am
Forum: Scripting
Topic: How to filter logging time 24 hours ago and topics=ppp and message=connected in log.0.txt [SOLVED]
Replies: 4
Views: 5903

Re: How to filter logging time 24 hours ago and topics=ppp and message=connected in log.0.txt [SOLVED]

Do you really need the "24 Hours" ?? I am asking, because that is relatively complex to execute.... Alternatively, it could be quite easy to write a script that exports the Log entries of the DAY. In other words, a script that exports the Logs of the "Today 22.01.2025" instead o...
by bara
Wed Jan 22, 2025 6:05 am
Forum: Scripting
Topic: How to filter logging time 24 hours ago and topics=ppp and message=connected in log.0.txt [SOLVED]
Replies: 4
Views: 5903

How to filter logging time 24 hours ago and topics=ppp and message=connected in log.0.txt [SOLVED]

halo can help me. i stuck to find script filter logging time 24 hours ago and topics=ppp and message=connected and save become new file txt this is script i created and running but just can filter topics ppp and message connected :local fileconten [/file/get ppp_log.0.txt contents] :local scriptfilt...