Community discussions

MikroTik App
 
myxa781
just joined
Topic Author
Posts: 3
Joined: Fri Jan 29, 2021 9:37 am

bug in ROS or in my head?

Tue Apr 06, 2021 8:29 am

good day, i need help:
i have a script at PPP profile (On Down):
:local aaa;
:set aaa [/log print as-value where time>([/system clock get time]-5s) && topics~"ovpn" && topics~"info" && message~"logged out"];
:set aaa [:pick [:tostr $aaa] [:find [:tostr $aaa] "from" -1] ([:find [:tostr $aaa] "from" -1]+33)];      
when ovpn user disconect, i try to catch string from log, and it's work fine... but after mindight, e.g at 00:10:15 this code return empty value, and e.g at 08:10:15 and to mindight it's work properly
what's wrong? ;)
p.s. ROS v6.47.9 (long term)
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 3279
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: bug in ROS or in my head?

Wed Apr 07, 2021 11:58 am

This may be due to that time format in logs are not equal over new day change.

IF Mikrotik has used RFC-3164 in their log format, this would have been fixed. Look at these two log messages.
apr/05 12:59:00 system,info,account user xyz logged out from 10.12.12.178 via ssh
11:01:32 system,info,account user xyz logged in from 10.12.12.32 via telnet
viewtopic.php?t=13740
viewtopic.php?p=828794#p828794

First time requested Februar 2007!!!!! 14 years ago, so you may have to wait some more years before they add it :)
 
myxa781
just joined
Topic Author
Posts: 3
Joined: Fri Jan 29, 2021 9:37 am

Re: bug in ROS or in my head?

Wed Apr 07, 2021 4:07 pm

phew, so bug isn't in my head :)
thx!

Who is online

Users browsing this forum: Google [Bot], ko00000000001 and 17 guests