Tech Tips: Hourly Log Rotation: You Can Make It So

Mike Hillyer
Aug. 1, 2011 by Mike Hillyer

One of the common questions I am asked is whether Momentum can be configured to rotate logs on an hourly basis instead of on a daily basis. The answer is yes. Log rotation is scheduled at /etc/cron.d/msys-ecelerity-core but keep in mind that ec_rotate is configured to retain only seven rotations. So if you switch to hourly rotations you will only retain seven hours of log data.

Retention is configured in /opt/msys/ecelerity/etc/ec_rotate.conf (if the file is not present you can copy it in from /opt/msys/ecelerity/etc/sample-configs/ec_rotate.conf) as “retention = 7”, if you want to rotate on an hourly basis and still maintain a week’s worth of logs you need to change this value to 168 (7 days * 24 rotations).

The most common reason for such regular log rotation is to decrease the lag between an event being logged and that event being updated in a backend database by a log processor. Momentum includes support for JLOG, an indexed log format that allows for near real time log processing, support check-pointing and automatic garbage collection. Watch this space for a future update on how you can take advantage of JLOG to simplify your log processing using JLOG.

Share your Thoughts

Your email address will not be published.

Related Content

Operating DNS on the AWS Network: Challenges and Lessons

Learn how our team worked with AWS to address a challenging DNS performance issue—and tips for troubleshooting with the AWS support team.

read more

Premium Service Offerings: What Our TAMs Can Do For You

Sending email isn't always smooth sailing. Our TAMs provide tailored premium support to customers navigating the tricky world of email deliverability.

read more

DKIM Validation: An Email Authentication Best Practice

An overview of DKIM validation including how to sign and validate work, interpreting DKIM signatures, what DKIM public keys look like and more.

read more

Start sending email in minutes!

The world’s most powerful email delivery solution is now yours in a developer-friendly, quick to set up cloud service. Open a SparkPost account today and send up to 100,000 emails per month for free.

Send 100K Emails/Month For Free

Send this to a friend