Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

2 Answers

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:

BEGIN_ROBOT ..
[...]
END_ROBOT

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
add comment

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
add comment

Your Answer

 
discard

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.