How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask James Dwyer Your Own Question
James Dwyer
James Dwyer, Computer Support Specialist
Category: Programming
Satisfied Customers: 153
Experience:  South County Tech, Data Processing, Cobol, RPG, Microsoft Certified Professional, A+ Certified Pro
22586229
Type Your Programming Question Here...
James Dwyer is online now

I need a solution to parse Apache log files and produce the

Customer Question

I need a solution to parse Apache log files and produce the following results:
- No. of successful requests per minute
- No. of error requests per minute
- Mean response time per minute
- MBs sent per minute
Preferably Python. Perl or Ruby would be fine and any use of logstash or similar would also be fine.
Please use the following log file to verify your process:
https://dl.dropboxusercontent.com/u/9679985/web-access.log
Log format (http://httpd.apache.org/docs/2.2/mod/mod_log_config.html):
"%a %l %u %t \"%r\" %>s %b %D"
Submitted: 2 years ago.
Category: Programming
Expert:  James Dwyer replied 2 years ago.
for my apache log parsing I use Webalyzer, its free and it does a great job, unless this is a "have to reinvent the wheel situation" I'd say get Webalyzer at http://www.webalizer.org/
Customer: replied 2 years ago.

Yeah unfortunately it is a 'have to reinvent the wheel' scenario. For a production deployment I would use Webalizer or AWStats but this is for a technical exercise and thus a standard log analysis platform will not suffice for this particular task.

Expert:  James Dwyer replied 2 years ago.
https://github.com/rory/apache-log-parser you may not be able to use a canned solution but the source is in python and might give you a steer in the right direction.