GithubHelp home page GithubHelp logo

radiocicletta / morganfreeman Goto Github PK

View Code? Open in Web Editor NEW
15.0 11.0 5.0 252 KB

A simple analytics for icecast servers

HTML 3.20% JavaScript 83.37% Python 13.43%
javascript icecast analytics icecast-server listeners

morganfreeman's Introduction

Morgan Freeman

A server-side statistics tool for icecast server.

(Like Google Analytics, but worst.)

  • collects real data about listeners on single streams
  • statistics visualization by html5 web app
  • no svg nor pre-rendered images, just canvas2d
  • full client-side data manipulation

Installation from source

$ git clone https://github.com/radiocicletta/morganfreeman.git
$ cd morganfreeman
$ virtualenv venv
$ source venv/bin/activate 
(morganfreeman)$ pip install -r requirements.txt
(morganfreeman)$ wget http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz
(morganfreeman)$ gunzip GeoLite2-City.mmdb.gz

Server initialization

The server-side collect-and-store engine is a standalone multithread process. A collector thread which polls the icecast server and store informations about listeners, and a http server thread listening at port 9000 which provides main interface and data.

run the server simply by invoking from shell (inside the virtualenv):

(morganfreeman)$ python morganfreeman/frosty.py -h <hostname> -u <username> -w <password> -b <bindport> [-r realm] [-d]
  • hostname is the icecast server to query (e.g. http://radiocicletta.it:8000 )
  • username and password are credentials required to read the *xsl pages provided by icecast
  • bindport is the listen port of the webserver (default 9000)
  • -d is the daemonize option

Client side usage

Simply go to http://localhost:9000 and enjoy.

morganfreeman's People

Contributors

leofiore avatar moul avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

morganfreeman's Issues

Suggestion to include periodic update to GeoLite database

If I recall correctly, the GeoLite free database updates periodically to correct for changing IP address physical locations. Since we only get the geolite database at install, is it possible to include scripting or some functionality to check for a new database and download it at some regular interval, even if its monthly?

Thanks!

Incomplete information on web interface

This is such a cool project!
I'm having a problem that the "current listeners" doesn't show anything, nor do the "Maximum" "Minimum" "Average per day" "Median per day" and the "Most quarter listened" "Least quarter listener" "Average listeners per quarter" and "Median listeners per quarter". Also I don't see any GeoIP information presented anywhere either. Is it possibly something on my system?

Ubuntu 14.04.03 all up to date. Initial installation was 8/20/2015 or so, and just pulled the latest version, but still having the issue.

Fix -r (realm) description and behaviour

because of different realms used by different icecast server versions providing -r is now mandatory. A bogus solution consists on hardcoding default realms for different icecast versions. Better solution is to enforce -r option as required.

Issues using System

Hello!

Running on windows.

I am trying to setup the authentication however I'm running into a few issues. Im using the following command to run the script: python frosty.py -h http://localhost:8000 -u admin -w password -b 9000 -r Icecast2 Server

When I do this, I get a -- MARK -- 401 Authentication error however when I change the host to /admin i get a 400 bad request.

Do you know how I can fix this?

Many thanks!

provide wsgi integration

inspect the conditions to write a uwsgi interface to use as an alternative to standalone server.

Support for icecast-kh version

Since icecast-kh is widely used we need a certain way to support it. The current codebase does not provide any minimal support.

OperationalError: no such table: listener

Just trying out your work - it should be really cool.

Unfortunately whenever I start it, I get the error

-- MARK --
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/threading.py", line 804, in __bootstrap_inner
    self.run()
  File "/home/ec2-user/morganfreeman/icestats/daemon.py", line 249, in run
    timedupdate()
  File "/home/ec2-user/morganfreeman/icestats/daemon.py", line 190, in timedupdate
    db = DB(self.db)
  File "/home/ec2-user/morganfreeman/icestats/db.py", line 51, in __init__
    self.db.execute(sql)
OperationalError: no such table: listener

What might be causing that?

Db initialization fails on new installations

I'm having trouble starting the daemon because an exception of a duplicate column with error:

Exception in thread Thread-1:
Traceback (most recent call last):
 File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
   self.run()
 File "/home/ubuntu/morganfreeman/icestats/daemon.py", line 201, in run
   timedupdate()
 File "/home/ubuntu/morganfreeman/icestats/daemon.py", line 165, in timedupdate
   db = DB(self.db)
 File "/home/ubuntu/morganfreeman/icestats/db.py", line 50, in __init__
   self.db.execute(sql)
OperationalError: duplicate column name: iso_code

Nothing on graphs

Hi,

I've managed to start the daemon using the -r option, but there nothing drawn on the graphs and current listeners shows nothing

getting errors in console ... Failed update

-- MARK --
Failed update: HTTP Error 401: Authentication Required
-- MARK --
Failed update: HTTP Error 401: Authentication Required
-- MARK --
Failed update: HTTP Error 401: Authentication Required

but i'm using the login and password of admin user that works from Web browser

what should I do about them ?

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.