This plugin monitors the actions on streams, and logs them in a database
Tested on Wowza 4.0.3
Requires a JDBC enabled database.
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
[...] <Modules> [...] <Module> <Name>Chaos-SB-Logging</Name> <Description>Statsbiblioteket Chaos logging datebase module</Description> <Class>dk.statsbiblioteket.medieplatform.wowza.plugin.statistic.StatisticLoggingSBModuleBase</Class> </Module> </Modules> [...]
Configuration is read from the file 'conf/chaos/chaos-streaming-server-plugin.properties' relative to the VHost path of the plugin (see Installation)
The following keys are used:
StatisticsLoggingJDBCDriver=org.postgresql.Driver StatisticsLoggingDBConnectionURL=jdbc:postgresql://localhost:5432/chaos-streaming-server-log StatisticsLoggingDBUser=wowzalog StatisticsLoggingDBPassword=password
Logging is done at VHost level. Edit the file 'conf/log4j.properties' relative to the VHost path of the plugin (see Installation) to set the desired log levels.
The database must have the following table created:
CREATE TABLE events ( 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/chaos-streaming-server-plugin.properties
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 http://www.wowza.com/resources/WowzaMediaServer_UsersGuide.pdf 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.