If the logrotate daily invocation already happened today, it won't consider the files "rotate-worthy" before next day.

So you might either add "-v" to the cron job so that it will tell you verbosely what/why it does on the next "proper" run. Or do "-f -d".

MK

On 13.11.2023 14:13, Dimi Onobodies via rsyslog wrote:
Hi Maiusz

Forgot to add that in my description. I already tried that and i didnt see any 
error reporte from logrotate:


   *    logrotate -d -v -s /var/lib/logrotate.status /etc/logrotate.conf

          considering log /data/logs/apache.log
          log does not need rotating (log has been already rotated)


I am thinking to force (-f) rotation and see if this will show anything
________________________________
From: rsyslog <rsyslog-boun...@lists.adiscon.com> on behalf of Mariusz Kruk via 
rsyslog <rsyslog@lists.adiscon.com>
Sent: Monday, November 13, 2023 9:13 AM
To: rsyslog@lists.adiscon.com <rsyslog@lists.adiscon.com>
Cc: Mariusz Kruk <k...@epsilon.eu.org>
Subject: Re: [rsyslog] logrotate wont compress-rotate syslog templated files

First and foremost, you should check what and why logrotate does when
rotating files (the -v and - d options for logrotate). That will tell
you what is actually happening when the rotation should occur.


On 13.11.2023 09:57, Dimi Onobodies via rsyslog wrote:
Hi, I am facing a weird logrotate issue in my central syslog system (receiving 
logs from various host via imtcp). Logrotate does not compress syslog templated 
log files. It does compress and rotates other log files generated by rsyslog, 
but not the ones generated using a template.
_______________________________________________
rsyslog mailing list
https://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.
_______________________________________________
rsyslog mailing list
https://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.
_______________________________________________
rsyslog mailing list
https://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to