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
|