monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [monit] Testing for file size during specific time period


From: Tomich,John
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.
 

Regards,

jt

888888888888
John Tomich, IS Web Infrastructure
Tempe campus
(  480.337.5854

 


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

Hi,

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
    return;
  else
   mv $1 $1.old


Martin


On Jul 26, 2008, at 12:34 AM, Tomich,John wrote:

Hi,

I'm new to monit and have a need to instruct monit to cause a logrotate if a certain file size threshold is reached, UNLESS the current system time is between certain endpoints.  Can anyone help me with how to configure this?


Regards,

jt

888888888888
John Tomich, IS Web Infrastructure
Edward Jones Investments
8640 S River Parkway
Tempe, AZ  85284
(  480.337.5854
*  address@hidden

 
 If you are not the intended recipient of this message (including attachments), or if you have received this message in error, immediately notify us and delete it and any attachments.  If you no longer wish to receive e-mail from Edward Jones, please send this request to address@hidden.  You must include the e-mail address that you wish not to receive e-mail communications.  For important additional information related to this e-mail, visit www.edwardjones.com/US_email_disclosure
 
 
--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general


reply via email to

[Prev in Thread] Current Thread [Next in Thread]