2

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.

2 Answers2

1

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.

Born To Ride
  • 1,084
  • 6
  • 10
0

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.

Florin Andrei
  • 1,208
  • 1
  • 12
  • 18