Giter Site home page Giter Site logo

pombredanne / narcissus-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ralphbean/narcissus

0.0 1.0 0.0 17.77 MB

realtime http log visualization

Home Page: http://narcissus.rc.rit.edu

License: GNU Affero General Public License v3.0

Shell 2.35% Python 78.87% CSS 3.69% JavaScript 13.39% Makefile 1.70%

narcissus-1's Introduction

Narcissus - Realtime visualizations of web server hits

Narcissus wastes a bunch of time.

Narcissus wastes a bunch of time.

What is this?

This is narcissus. It is a web application that visualizes web server hits as they happen in real time.

Features:

  • IP addresses converted to latitude/longitude, then streamed via WebSockets to polymaps.
  • Realtime graphs of what countries are downloading what content with d3.
  • Ømq (zeromq) on the backend.
  • Fast. No polling.

Live Demo

You can see narcissus running live at narcissus.rc.rit.edu.

The Research Computing department at the Rochester Institute of Technology runs that narcissus instance. It is pointed at their very active FOSS mirror. (That site is the highest-traffic site at RIT!)

Source

Get the source from github.com.

Running

There are three processes that make up narcissus:

  • The web app that serves the initial map.
  • The websocket server, a.k.a the Moksha Hub, that serves the realtime data stream
  • The data collection script that feeds the Moksha Hub.

The Web App

Set up the WSGI app:

$ mkvirtualenv narc
$ pip install narcissus.app

Grab a default config file:

$ wget https://raw.github.com/ralphbean/narcissus/develop/narcissus.app/development.ini

And start that development-grade web server:

$ ~/.virtualenvs/narc2/bin/narcissus.app-serve

You can also you apache with mod_wsgi to serve this if you wanted to do it more permanently.

The Moksha Hub

Assuming you're running the web app and the Moksha Hub on the same machine, you can share the virtualenv as well and just run:

$ workon narc
$ pip install narcissus.hub
$ ~/.virtualenvs/narc2/bin/moksha-hub

The Data Collection Script

Assuming you want to visualize the logs of a lighttpd server, you can run:

$ tail -f /var/log/lighttpd/access.log | \
    narcissus-zeromq-source --targets=tcp://0.0.0.0:11987

The development.ini file tells the moksha-hub to connect to tcp://0.0.0.0:11987 from which it will start getting your raw lighttpd logs. Those are then processed and stats are forwarded via WebSockets to anyone viewing the web app.

IRC

Try us in #moksha on irc.freenode.net.

Authors

Powered by

Moksha

narcissus-1's People

Contributors

decause avatar lmacken avatar n6udp avatar ralphbean avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.