SB Database Statistics Plugin


This plugin monitors the actions on streams, and logs them in a database


Tested on Wowza 4.0.3
Requires a JDBC enabled database.


Configuring Wowza

Configuration is done in the file 'conf/chaos/Application.xml' relative to the VHost path of the plugin (see Installation).
The file is based on 'examples/SimpleVideoStreaming/conf/vod/Application.xml' from the Wowza system directory. It must be updated with the following step:

Add the Statistics module

        <Description>Statsbiblioteket Chaos logging datebase module</Description>

Configuring plugin

Configuration is read from the file 'conf/chaos/' relative to the VHost path of the plugin (see Installation)

The following keys are used:


Configuring logging

Logging is done at VHost level. Edit the file 'conf/' relative to the VHost path of the plugin (see Installation) to set the desired log levels.

Database configuration

The database must have the following table created:

	event_id INTEGER NOT NULL, 
	timestamp TIMESTAMP, 
	stream_name VARCHAR, 
	event_type VARCHAR, 
	user_id INTEGER, 
	started_at INTEGER, 
	ended_at INTEGER, 
	PRIMARY KEY (event_id));


Assuming a Wowza server installed in $WOWZADIR configured with a toplevel directory for a VHost called $VHOSTDIR, the following is needed:

Add the distributed JAR files to $VHOSTDIR/applications/lib (note: distributed are database drivers for postgresql-9 and hsql. If another database is desired, the appropriate JDBC driver must be deployed as well)
Create the directory $VHOSTDIR/conf/chaos
Place the configuration file in $VHOSTDIR/conf/chaos/
Place the application file in $VHOSTDIR/conf/chaos/Application.xml
Create the directory $VHOSTDIR/applications/chaos

(To use an external VHost dir, follow the instructions from section "Virtual Hosting")


In a browser, open the URL


(replace /usr/local/WowzaStreamingEngine with $WOWZADIR)

At server, type

At stream, type an avaiable stream from content.

Assuming that file is available in the content directory of the VHost, the file should now start playing. Try pausing and seeking.

The events should now be recorded in the database. Use any database analysis tool to query the database.