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

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What tools can I use to monitor my Apache Log files and create alerts based on traffic. I need to:

  • Get an alert when a spider that is outside of a defined list exceeds a set number of requests in any given day.
  • Get an alert when traffic from a network outside of a defined list exceeds a set number of requests in any give week.

I can view this data in AWStats and Google Analytics but I want to set up automated alerts for this. I could hand roll some scripts but I thought their might be an existing solution. We are running on Linux/Apache/MySQL and an open source solution would be a plus.

share|improve this question

Since you parse the logs with AWStats, you could use the information it collects in its database, which is a plain text file and is pretty easy to parse.

Look for the section:


The amount of bandwidth each spider has consumed is aggregated in the third column. I bet you could easily write a small script that retrieves the information you need and sends you an alert if the bandwidth consumption exceeds the limits you have set.

Hope this helps.

share|improve this answer

Probably not what you're looking for, but if you want a serious log management application, have a look at Splunk. It will do what you want and a lot more.

share|improve this answer

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.