Community discussions

MikroTik App
 
dawdler
just joined
Topic Author
Posts: 5
Joined: Wed Apr 13, 2016 1:03 pm

time of last config change

Fri Jul 23, 2021 6:09 pm

Is there a way to determine the time of the last config change?

Currently configs are "backed up" every 24hrs, whether there has been a config change or not,
so one of my monthly tasks is to dedupe 10000+ config files (down to ~430)
Its quite tiresome...
( could be worse - previously it had been considered a good idea to run 3 "back ups" a day...)
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11381
Joined: Thu Mar 03, 2016 10:23 pm

Re: time of last config change

Fri Jul 23, 2021 6:24 pm

No, time of last change is not available.

There are tools to show differences in (text) files, it's possible to automate process.
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 3279
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: time of last config change

Fri Jul 23, 2021 6:36 pm

In my Splunk for MikroTik I do log all config changes. For older version its not detailed as it is for version 7. With version 7 it logs all commands.
See link in my signature.

Example on 6.x logs:
2021-07-18 16:03:32 192.168.88.1	Ro1	admin	changed	nat rule
2021-07-18 15:58:21	192.168.88.1	Ro1	admin	changed	nat rule
2021-07-18 15:03:27	192.168.88.1	Ro1	admin	changed	nat rule
2021-07-18 09:45:51	192.168.88.1	Ro1	admin	changed	nat rule
2021-07-18 09:45:47	192.168.88.1	Ro1	admin	changed	nat rule
2021-07-18 09:23:42	192.168.88.1	Ro1	admin	added	nat rule
2021-07-17 21:41:48	192.168.88.1	Ro1	admin	added	address list entry
2021-07-17 08:38:31	192.168.88.1	Ro1	admin	settings	changed script
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: time of last config change

Sat Jul 24, 2021 4:02 am

No, time of last change is not available.
Is not true for my point of view, because I know better some aspects of RouterOS...
And for sure you know better some others aspects than me.

Simply check the history action on memory, if the time of last changed config is different, than something is changed...

the list is on reverse-order, must be selected the first, not the last:
/system history
:put [get ([find]->0) time]

Obviously if is empty nothing changed....
/system history
:if ([:len [find]] = 0) do={.....}
 
dawdler
just joined
Topic Author
Posts: 5
Joined: Wed Apr 13, 2016 1:03 pm

Re: time of last config change

Mon Jul 26, 2021 12:39 pm

thanks Jotne, I'll look at Splunk with Mikrotik logs, could be interesting.
But I think rextended method looks good, I'll test
Thanks!

Who is online

Users browsing this forum: Ahrefs [Bot], GoogleOther [Bot] and 80 guests