Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
22.1 Legacy Series
»
Clearing local logs doesn't re-create "latest.log" symlink
« previous
next »
Print
Pages: [
1
]
Author
Topic: Clearing local logs doesn't re-create "latest.log" symlink (Read 1667 times)
Ben.
Jr. Member
Posts: 62
Karma: 0
Clearing local logs doesn't re-create "latest.log" symlink
«
on:
January 30, 2022, 12:26:18 pm »
Hi,
With 22.1 we have now this handy symbolic link "latest.log" pointing to the latest logfile.
I just realized though that this symlink is getting removed (and not re-created) when you reset your local log files.
Do others also face this issue or am I just too impatient that it would be re-created once there is the next log entry written?
Logged
franco
Administrator
Hero Member
Posts: 17661
Karma: 1611
Re: Clearing local logs doesn't re-create "latest.log" symlink
«
Reply #1 on:
January 30, 2022, 01:07:15 pm »
We can change that but what do you use it for? It's not used anywhere in the system except for opnsense-log utility which can only be used manually.
Cheers,
Franco
Logged
Ben.
Jr. Member
Posts: 62
Karma: 0
Re: Clearing local logs doesn't re-create "latest.log" symlink
«
Reply #2 on:
January 30, 2022, 01:11:49 pm »
Im not sure I understand your question.
Since 22.1 there is the link
Code:
[Select]
/var/log/system/latest.log
which was introduced to make log processing easier, no?
I use this symlink to monitor the system log via monit.
Now if I reset the logs to clear some disk space, this link is removed and monit sends me alerts that the file doesnt exist.
So if the function "clear logfiles" would just recreate the symbolic link, there is no alert in monit.
Does this answer your question?
Logged
franco
Administrator
Hero Member
Posts: 17661
Karma: 1611
Re: Clearing local logs doesn't re-create "latest.log" symlink
«
Reply #3 on:
January 30, 2022, 01:13:39 pm »
> I use this symlink to monitor the system log via monit.
Ok, you would be the first
GitHub issue in core would be helpful. The symlink is recreated every hour via cron job. The log clear was missed it seems.
This is all good and well... progress.
Cheers,
Franco
Logged
franco
Administrator
Hero Member
Posts: 17661
Karma: 1611
Re: Clearing local logs doesn't re-create "latest.log" symlink
«
Reply #4 on:
January 30, 2022, 01:14:41 pm »
PS: Reboot or the following command works as well if you can't wait for the cron job...
# configctl syslog archive
Logged
Ben.
Jr. Member
Posts: 62
Karma: 0
Re: Clearing local logs doesn't re-create "latest.log" symlink
«
Reply #5 on:
January 30, 2022, 01:52:27 pm »
Thanks, good to know.
Maybe I will not remain the first
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
22.1 Legacy Series
»
Clearing local logs doesn't re-create "latest.log" symlink