Skip to content

An internal reporting tool that will use information from the database ( contains newspaper articles, as well as the web server log for the site) to discover what kind of articles the site's readers like.

License

Notifications You must be signed in to change notification settings

narotamsingh/Web-Server-Logs-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Web-Server-Logs-Analysis

By Narotam Singh

An internal reporting tool that will use information from the database ( contains newspaper articles, as well as the web server log for the site) to discover what kind of articles the site's readers like. The log has a database row for each time a reader loaded a web page.

Output of code:

Using above information, this code will answer following questions:

  1. What are the most popular three articles of all time?
  2. Who are the most popular article authors of all time?
  3. On which days did more than 1% of requests lead to errors?

Requirements:

Python
Vagrant
Virtual Box
PostgreSQL

How to install and use:

  • Install Virtual Box, Vagrant.
  • Clone the VM configuration vm
  • Download this repo Or Clone this repo into the /vagrant directory.
  • Launch the VM:
    • $ vagrant up
  • SSH into the VM:
    • $ vagrant ssh
  • In the VM navigate to the /vagrant folder:
    • vagrant@vagrant:~$ cd /vagrant
  • Download Data. The file inside is called newsdata.sql, put this file into the vagrant directory, which is shared with your virtual machine.
  • Load the data into the news database already in the VM:
    • vagrant@vagrant:~$ psql -d news -f newsdata.sql
  • Run application:
    • vagrant@vagrant:~$ python wlogs_analysis.py

Output:

Image for output

About

An internal reporting tool that will use information from the database ( contains newspaper articles, as well as the web server log for the site) to discover what kind of articles the site's readers like.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages