Community discussions

MikroTik App
 
Gesuino
just joined
Topic Author
Posts: 13
Joined: Mon Jan 21, 2019 5:28 pm

Delete profile in ppp secret last logged out older than 1 Month

Mon Aug 19, 2019 12:08 pm

Hi guys, need a help.
I need a script for deleting older profile in /ppp secret for clients that haven't connected for one month.
I dont understand how to processing "latest logged out" value, it is not simple:
put [ppp secret get [find name=mgmt] last-logged-out]
aug/16/2019 12:10:58 <-How i can process this output for verify if it is older than 1 month?

Thanks
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 1910
Joined: Sat Dec 24, 2016 11:17 am
Location: jo.overland at gmail.com

Re: Delete profile in ppp secret last logged out older than 1 Month

Mon Aug 19, 2019 6:09 pm

Should be doable if logg store data as long as one month.

See here on how to get an idea on data calculation.
viewtopic.php?t=119703
 
Why do not use Splunk to monitor your MikroTik Router(s)? Look at this page in how to set it up.

MikroTik->Splunk
 
 
Gesuino
just joined
Topic Author
Posts: 13
Joined: Mon Jan 21, 2019 5:28 pm

Re: Delete profile in ppp secret last logged out older than 1 Month

Mon Sep 02, 2019 1:37 pm

Hi thanks for your answer, i tried the script on page but it seems can't process output of /ppp secret get last-logged-out very well, so i modified this with my needs:
https://wiki.mikrotik.com/wiki/Expire_u ... er_of_days.
 
eyktan
just joined
Posts: 1
Joined: Sun Jan 24, 2021 1:43 pm

Re: Delete profile in ppp secret last logged out older than 1 Month

Sun Jan 24, 2021 1:56 pm

Hi, can I ask you to please post a script to delete ppp secret older than 30 days? I need to solve the same problem.

Who is online

Users browsing this forum: Baidu [Spider] and 17 guests