Changing logrotate script timing

Hello All,

The logrotate -vvv -f /etc/logrotate.d/kaltura_apache command is rotating /opt/kaltura/log/kaltura_apache_access.log_ to /opt/kaltura/web/logs/ daily between 3-4 a.m…

How can i configure the logrotate script to run at a particular time of the day.

I have checked /etc/logrotate.d/kaltura_apache file, but it provides me only the option of configuring it on daily,weekly or monthly basis.

Hi,

If you want it to run in a different time, without changing it for the whole system, you can simple set a separate cron job that calls logrotate -vvv -f /opt/kaltura/app/configurations/logrotate/kaltura_apache at a certain hour and remove the symlink /etc/logrotate.d/kaltura_apache so that the main logrotate does not iterate over it.

Hello Jess,

I have tried to set the logrotate in cron job to run at particular hour and thereafter I have also set the following scripts in my DWH server to run just after the log is rotated.But it doesn’t work.

/opt/kaltura/dwh/etlsource/execute/etl_hourly.sh -p /opt/kaltura/dwh -k /opt/kaltura/pentaho/pdi/kitchen.sh
/opt/kaltura/dwh/etlsource/execute/etl_update_dims.sh -p /opt/kaltura/dwh -k /opt/kaltura/pentaho/pdi/kitchen.sh
/opt/kaltura/dwh/etlsource/execute/etl_daily.sh -p /opt/kaltura/dwh -k /opt/kaltura/pentaho/pdi/kitchen.sh
/opt/kaltura/dwh/etlsource/execute/etl_perform_retention_policy.sh -p /opt/kaltura/dwh -k /opt/kaltura/pentaho/pdi/kitchen.sh
/opt/kaltura/app/alpha/scripts/dwh/dwh_plays_views_sync.sh >> /opt/kaltura/log/cron.log

It seems to me that when I run the logrotate and the above scripts directly from the shell command line, they are run with full permission and with root user.

I am new to kaltura, I dont know from which user the scripts are run when they are set in the cron job
Kindly help me with this.