A simple node application which monitors visitor activity, logging connections to MySQL. You'll need a shoutcast server running with access to the admin.cgi pages. I run sc_serv on an AWS micro instance running Ubuntu.
Floyd pings the shoutcast server every 15 seconds, and if the song has changed, updates the Mysql recording play counter. Floyd then collects listener connection data, peforms geoip lookup on the connected IP address and stores/updates the record in the listeners table.
The listeners table is used by a seperate project which displays listener activity and analytics. (see other repo)
Import mysql/stream_mysql.sql
into your database
Edit config.sample.json
and save it as config.json
{
"shoutcast" : {
"url": "http://yourserver.org:8000",
"pass" : "yourpassword_admin",
"mode" : "viewjson",
"sid" : 1,
"path" : "admin.cgi"
},
"mysql" : {
"host": "localhost",
"user": "MysqlUsername",
"password": "MysqlPassword",
"database": "MysqlDatabaseName"
}
}
npm run install
npm run start
- Web console dashboard (in progress)
- Reporting / Analytics functions for queries
- Shoutcast Administration functions (kick/ban/reserve)
- Multiple stream monitoring
Author: Scott Fleming
Hawkwynd Radio - Live broadcasts Friday nights 7pm CST 24/7 Classic Rock & Excellent Music