Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I run multiple Linux (Ubuntu) web servers and am looking for a convenient way to keep tabs on important log files. I'd like to monitor pertinent LAMP logs as well as server accesses/logins.

Are there any convenient tools/utilities that will (a) rotate log files, (b) compress them, and (c) email or archive them for later viewing?

share|improve this question
Not as an answer to your question, but you should look at centralizing your logs off-machine. Having all of your logs spooled into the same server assists with finding patterns which can act as precursors to critical errors. –  Matt Simmons Jan 8 '12 at 19:03

2 Answers 2

up vote 4 down vote accepted

Logrotate will do everything you list above and more e.g.

"/var/log/httpd/access.log" /var/log/httpd/error.log {
    rotate 5
    size 1M
        /usr/bin/killall -HUP httpd

Would mail you the logs that are about to be deleted etc

share|improve this answer
Combine with logwatch and it will break out useful information in easily readable format too, plus its easy to extend. –  Mattias Ahnberg Jan 8 '12 at 19:37
Combine with Logstash and you get off-server centralised storage and indexing –  Tom O'Connor Jan 8 '12 at 20:22
logstash looks pretty nice. –  LVLAaron Jan 8 '12 at 23:01

How about something like Splunk? I collect 10gb of data per day with it..... :)

share|improve this answer
Its only free up to 500Mbyte per day though, above that it starts to be quite heavily priced. :/ –  Mattias Ahnberg Jan 8 '12 at 19:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.