|Subject:||RE: [monit] Testing for file size during specific time period|
|Date:||Fri, 25 Jul 2008 18:19:03 -0500|
Thank you for responding so quickly. Yes, I had pretty much come to the conclusion that instead of calling logrotate directly, as we currently do, we'll need to call a script that wraps logrotate, as you suggest. It seems the need to not rotate logs during peak load hours is a recent development, whereas previously, we were able to do this without negative system impact.
I appreciate your timely confirmation.
From: address@hidden [mailto:address@hidden On Behalf Of Martin Pala
Sent: Friday, July 25, 2008 4:11 PM
To: This is the general mailing list for monit
Subject: Re: [monit] Testing for file size during specific time period
you can use the exec action to run your custom script which may skip the logrotate based on current time. For example:
check file myfile with path /my/file
if size > 100MB then exec "/opt/scripts/do_logrotate.sh /my/file"
whereas the do_logrotate.sh can do something like this (abstract):
if dayofweek == sunday
mv $1 $1.old
On Jul 26, 2008, at 12:34 AM, Tomich,John wrote:
|[Prev in Thread]||Current Thread||[Next in Thread]|