By default BOA clobbers several log files, this cron job:

11 * * * * bash /var/xdrago/clear.sh >/dev/null 2>&1

Clobbers these logs:

grep "echo rotate" /var/xdrago/clear.sh
  echo rotate > /var/log/php/php-fpm-error.log
  echo rotate > /var/log/php/php-fpm-slow.log
  echo rotate > /var/log/php/php53-fpm-error.log
  echo rotate > /var/log/php/php53-fpm-slow.log
  echo rotate > /var/log/php/error_log_52
  echo rotate > /var/log/php/error_log_53
  echo rotate > /var/log/php/error_log_cli_52
  echo rotate > /var/log/php/error_log_cli_53
  echo rotate > /var/log/redis/redis-server.log
  echo rotate > /var/log/mysql/sql-slow-query.log
  echo rotate > /var/log/nginx/access.log

And this cron job:

18 0 * * * bash /var/xdrago/graceful.sh >/dev/null 2>&1

Clobbers these logs:

grep "echo rotate" /var/xdrago/graceful.sh
  echo rotate > /var/log/nginx/speed_purge.log
  echo rotate > /var/log/newrelic/nrsysmond.log
  echo rotate > /var/log/newrelic/php_agent.log
  echo rotate > /var/log/newrelic/newrelic-daemon.log

On servers where there isn't a problem with disk space it would be nice if there was an option to disable this clobbering and rely on the distribution log rotation scripts as there is potentially useful information that is lost when the logs are clobbered.

Comments

omega8cc’s picture

Status: Active » Closed (won't fix)

These logs have no configured logrotate scripts, so we just wipe them out. We do this also because on fast enough system with SSD it is possible to quickly fill the disk with logs if there is something which keeps generating errors. We have seen servers crashed because of this, hence this aggressive procedure.

I don't consider it worth adding extra logrotate scripts since any really useful errors you can find in the syslog anyway, but feel free to disagree and submit patch for review and re-open.

Also, you seems to use really old BOA version, because we don't purge Nginx access log, unless there is /root/.high_traffic.cnf control file.