Udacity/Full_Stack _Web _Developer/Project-3 _ Log_Analysis
This project is maintained by vjvijayg
Udacity log analysis project is to build an internal reporting tool that will analyze information from the newspaper database to discover what kind of articles the site’s readers like. Source code can be found here
vagrant up
commandvagrant ssh
command to login the Virtual Machine you may need login detailsvagrant ssh
execute cd /vagrantpsql -d news -f newsdata.sql
.python log.py
to check out the output. create view new_log as
select substring(path, 10) as newpath, status, id
from log;
create view art_log as
select new_log.newpath, articles.author,articles.slug, articles.id
from new_log join articles
on articles.slug=new_log.newpath;
create view error_log as
select time::timestamp::date as date, count(*) as errors
from log where status similar to '404%'
group by date order by errors desc;
create view request_log as
select time::timestamp::date as date, count(*) as requests
from log group by date order by requests desc;
create view error_rate as
select error_log.date as day, error_log.errors::float/request_log.requests*100 as error_ratio
from error_log join request_log on error_log.date=request_log.date
order by error_ratio desc limit 10;
Please refer to the wiki to find more about project.
Creating a internal tool which generates meaningful reports for the Newspaper Database, which has Articles, Authors and log table using postgresql and python script. The database contains newspaper articles, as well as the web server log for the site. The log has a database row for each time a reader loaded a web page.
Analyzing data from the logs of a web service to answer questions such as
Building an informative summary from logs is a real task that comes up very often in software engineering.