Cronjobs and tutor

I used the scripts I found in the configuration repo to set up logrotate and send the logs to an s3 bucket.

From send-logs-to-s3 and edx_logrotate_tracking_log.

I created both /etc/logrotate.d/hourly/lms_tracking.log and /etc/logrotate.d/hourly/cms_tracking.log

/home/ubuntu/tutor_root/data/lms/logs/tracking.log {
    size 1M
    compress
  create
  dateext
  dateformat -%Y%m%d-%s
  missingok
  nodelaycompress
  notifempty
  rotate 16000
  postrotate
    /usr/bin/killall -HUP rsyslogd
  endscript
  lastaction
    /usr/local/bin/send-logs-to-object-store -d "/home/ubuntu/tutor_root/data/lms/logs" -b "mybucket" -p "logs/tracking/"
    endscript
}

Oh, that would be a nicer way to do it. I’ve been playing with the idea of creating a “tutor-utils” plugin that could support some of the server admin tasks (log rotation, backups…).

I think the format of the tracking log is different. I have never used Insights so I don’t know for sure but it’s probably worth double checking @sambapete.