Apache Log Notifications in Linux

A NotifyOSD notification of log activity
A NotifyOSD notification of log activity

I have a small personal website, as you can see, that gets the odd visitor now and then. This makes me happy! so I like to know about it. There are plenty of statistic gathering scripts like Google Analytics that generate excellent aggregate data, but for my scale of website I prefer a more fine-grain monitoring. I use BBClone for this and it does an awesome job. Other than wishing it had the option for a SQL back-end, I always thought it would be great to have a real time notification of someone paying a visit.

Thus my java ApacheLogNotifier was born!

Using Java and Ubuntus port of NotifyOSD via the notification demon, I have created a small program to poll the tail of my Apache log and notify me whenever there is interesting activity. At the moment I ignoring localhost and bots, so that I can see if an actual person has just come to visit my website. There is a lot of work and refactoring to be done. My initial prototype is just a rushed couple of hours work (thanks to reusing the tail code from http://www.informit.com/guides/content.aspx?g=java&seqNum=226).

For more information and to get the code look at the wiki page.