Ask Your Question
2

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

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

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
0

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

ramindk gravatar image

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

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.

/etc/logrotate.d/delayed_job

# PUPPETHEADER: This file is owned by Puppet.

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

Comments

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 -0500 )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 -0500 )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

Stats

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

Seen: 379 times

Last updated: Sep 10 '13