Perl solution to find similar patterns in log files
I would like to have a script which captures similar patterns in a file. For example I would like to see in my web log if the request is coming from a certain IP address more than 10 times. I like to make that no configurable and also run this script as a cron job. My error log looks like follows
Mon May 01 13:48:11 CDT 2006
If the above pattern that includes the ip address occurs more than 10 times, I would like to be alerted through the output and also possibly send out a email (through unix mail feature). Essentially I need the script to do the following:
a. Able to take in a string to look for the similar patterns
b. Ability to change the threshold to alert when the similar patterns crosses that threshold on a given day
c. Ability to search by date
Note: I want to have the option of being alerted
a. Only when the session id's are different
b. Only when the session id's are same.
Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.