I am facing issue. We have setup log forwarder for sentinel and logs are frequently coming on /var/log/messages.
Actual problem is
i have created one script for log rotation and placed it under /etc/logrotate.d/ with name messages.conf below is the configuration
Now this scripts at 3AM and creates a new directory as per today's date and ideally after that the logs should start coming in nee directory bu it is not.
what is happening actually is on the first rotation the logs will be shifted from /var/log/messages to /var/log/messages-20220517 but when script will run next day it will create a directory /var/log/messages-20220518 but logs will still be coming in previous day directory /var/log/messages-20220517.
just FYI we have not made any changes in any other conf file.
Flavor - CentOS Linux release 7.9.2009 (Core)
Can anyone let me what is the issue are we missing something? how can we get this sorted we are stuck here.