Dear BSD Users
I’m looking for a way to get rid of “abandoned” logfiles.
We are using syslog-ng and are rotating the files with newsyslog
Each client has his own logfile where we get stuff from syslog-ng. The files are in
The newsyslog config line is:
Now if a customer is leaving, we still have his log file, which is rotated on a daily basis.
Is there a nice way to tell newsyslog to do-not-create-logfiles? If a new message appears, syslog-ng is creating the file…
Initially I was thinking about deleting all empty files at 23:55 each day. But this may has the drawback that the files
Deleting all the
Any hints are appreciated
Best regards
Philippe
I’m looking for a way to get rid of “abandoned” logfiles.
We are using syslog-ng and are rotating the files with newsyslog
Each client has his own logfile where we get stuff from syslog-ng. The files are in
/var/log/syslog-ng/cpe/<customer>.log
The newsyslog config line is:
/var/log/syslog-ng/cpe/*.log 644 10 * @T00 JG
Now if a customer is leaving, we still have his log file, which is rotated on a daily basis.
Is there a nice way to tell newsyslog to do-not-create-logfiles? If a new message appears, syslog-ng is creating the file…
Initially I was thinking about deleting all empty files at 23:55 each day. But this may has the drawback that the files
<customer>.0
to <customer>.9
are left behind (I haven’t tested this)Deleting all the
<customer>.*
files is also a “bad” idea, since its possible that a client is not sending any logs for some days and I’d like to keep the last events (if they’re within the last 10 days)Any hints are appreciated
Best regards
Philippe