Ask Your Question

How to customize dashboard log rotation in config\environment.rb

asked 2013-08-29 09:51:57 -0600

vanyans gravatar image

I am looking on how to customize dashboard log rotation in environment.rb file since I wasn't able to find anything on-line on this.

Our logs in /usr/share/puppet-dashboard/log are getting quite big and I would like to clean them up properly. (they are about 8 GB now).

CentOS 6.3, puppet v. 3.2.4, dashboard v. 1.2.23

Thank you, Tina

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-08-29 16:02:48 -0600

ramindk gravatar image

updated 2013-09-10 14:56:41 -0600

Good question.

I've had failures with commands trying to use restart. script/delayed_job restart (and variations of the same) loses the watchdog process or starts a new instance without properly stopping the old. In the end I decided to switch the logrotate config to copytruncate which has been far more reliable over the past two nights.


# PUPPETHEADER: This file is owned by Puppet.

/usr/share/puppet-dashboard/log/*.log {
  copytruncate # this requires no restart of the process to let go of the file
  rotate 6
edit flag offensive delete link more


Thanks for your answer. I had to concentrate on another high priority task. But I'll be working on this again this week.

vanyans gravatar imagevanyans ( 2013-09-09 06:17:42 -0600 )edit

Thanks. I played with different parameters for the past couple of days too and came with the following: /usr/share/puppet-dashboard/log/delayed_job.log { daily rotate 7 missingok compress notifempty ...(more)

vanyans gravatar imagevanyans ( 2013-09-11 11:00:01 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2013-08-29 09:51:57 -0600

Seen: 410 times

Last updated: Sep 10 '13