Configuration Options

Table of Contents

1. Information

All the configuration keys referred on this page are optional and therefore are not required to startup Sakai with SiteStats. These keys should go in sakai.properties

Upgrading from 0.5.x releases

Please note that the configuration keys in sakai.properties have changed in the pre_1-0 release. You need to review your configuration based on the information provided on this page. Starting Sakai with invalid configuration keys will lead to a startup failure.





2. Site Stats configuration options

2.1. Default chart rendering options

Configuration key Description Version Default value
chartBackgroundColor@org.sakaiproject.sitestats.api.StatsManager Default chart background color 1.0+ white
chartIn3D@org.sakaiproject.sitestats.api.StatsManager Show charts in 3D by default? 1.0+ false
chartTransparency@org.sakaiproject.sitestats.api.StatsManager Default chart transparency (acceptable values: 0.10f - 1.00f, where 0.10f = 10% and 1.00f = 100%) 1.0+ 1.00f
itemLabelsVisible@org.sakaiproject.sitestats.api.StatsManager Show bar charts item labels by default? 1.0+ false
enableSiteVisits@org.sakaiproject.sitestats.api.StatsManager Force the enable/disable of display visits related information in the tool 1.0.4+ Tool checks if presence is enabled/disabled or if 'presence.events.log' property is set in Sakai to determine default value
enableSiteActivity@org.sakaiproject.sitestats.api.StatsManager Enable/disable the display of the activity chart in SiteStats Summary page. 1.0.2+ true



2.2. Event aggregation configuration options

Configuration key Description Version Default value
collectThreadEnabled@org.sakaiproject.sitestats.api.StatsUpdateManager Enable/disable collect thread 1.0+ true
collectThreadUpdateInterval@org.sakaiproject.sitestats.api.StatsUpdateManager Db update interval for collect thread (in ms) 1.0+ 4000
collectAdminEvents@org.sakaiproject.sitestats.api.StatsUpdateManager Aggregate administrator events? 1.0+ false
collectEventsForSiteWithToolOnly@org.sakaiproject.sitestats.api.StatsUpdateManager Aggregate events ONLY for sites with SiteStats tool? 1.0+ true
showAnonymousAccessEvents@org.sakaiproject.sitestats.api.StatsManager Aggregate anonymous access events for public sites (with .anon role) 2.4.x
2.5.x
2.0+
true
lastJobRunDateVisible@org.sakaiproject.sitestats.api.StatsManager Show/hide date from last event processed by the quartz job in tool overview page: 1.0+ true if collectThreadEnabled = false, false otherwise
maxEventsPerRun@org.sakaiproject.sitestats.api.StatsAggregateJob Max # of events to be aggregated by the Quartz job 1.0+ 50000
startEventId@org.sakaiproject.sitestats.api.StatsAggregateJob First eventId to be processed by the Quartz job. If not specified, job will use the higher eventId available in SAKAI_EVENT when Sakai started up. This is for the first job run only - after that, status is maintained in SST_JOB_RUN table 1.0+ By default, will use the higher eventId available in SAKAI_EVENT when Sakai started up
driverClassName@org.sakaiproject.sitestats.api.StatsAggregateJob DB driver class name. Use this if SAKAI_EVENT and SAKAI_SESSION lives on a different database from the Sakai one 1.0+ none
url@org.sakaiproject.sitestats.api.StatsAggregateJob Jdbc url for the alternative database. Use this if SAKAI_EVENT and SAKAI_SESSION lives on a different database from the Sakai one 1.0+ none
username@org.sakaiproject.sitestats.api.StatsAggregateJob Username for accessing the alternative database. Use this if SAKAI_EVENT and SAKAI_SESSION lives on a different database from the Sakai one 1.0+ none
password@org.sakaiproject.sitestats.api.StatsAggregateJob Password for accessing the alternative database. Use this if SAKAI_EVENT and SAKAI_SESSION lives on a different database from the Sakai one 1.0+ none



2.3. Tool/event support (add/remove)

Generated events may differ between Sakai releases

SiteStats have different event definition files for different Sakai releases. You may want to point * toolEventsDefinitionFile* setting below to the appropriate file in your installation (view folder content). A filename without version number means it is for the current sakai release.

Configuration key Description Version Default value
toolEventsAddDefinitionFile@org.sakaiproject.sitestats.api.StatsUpdateManager Path to tool event definition file: add support for new tools or new events to existing tools. Can also be used to change default selected flag. 1.x n.a.
toolEventsRemoveDefinitionFile@org.sakaiproject.sitestats.api.StatsUpdateManager Path to tool event definition file: remove support for entire Tools or subset of Tool events. 1.x n.a.
toolEventsDefinitionFile@org.sakaiproject.sitestats.api.StatsUpdateManager Path to tool event definition file (events to be collected). This will completely replace the default bundled definition file. 1.x toolEventsDef.xml
toolEventsAddDefinitionFile@org.sakaiproject.sitestats.api.event.FileEventRegistry Path to tool event definition file: add support for new tools or new events to existing tools. Can also be used to change default selected flag. 2.0+ n.a.
toolEventsRemoveDefinitionFile@org.sakaiproject.sitestats.api.event.FileEventRegistry Path to tool event definition file: remove support for entire Tools or subset of Tool events. 2.0+ n.a.
toolEventsDefinitionFile@org.sakaiproject.sitestats.api.event.FileEventRegistry Path to tool event definition file (events to be collected). This will completely replace the default bundled definition file. 2.0+ toolEventsDef.xml
checkLocalEventNamesFirst@org.sakaiproject.sitestats.api.event.EntityBrokerEventRegistry Whether to first check local event descriptions provided within the Site Stats bundles and, second, check event descriptions provided in Statisticable capability implementations. By default this is false (reverse order). 2.0+ false

Note: The recommendation here is to not replace the default bundled configuration file in order to get support for additional tools uppon SiteStats updates.

Warning

When adding new tool events, the event description must be specified in the appropriate resource bundle file located in the sitestats/sitestats-impl/src/bundle/org/sakaiproject/sitestats/impl/bundle folder!


2.3.1 Tool event definition file (excerpt)

Below is an excerpt of the tool event definition file used by SiteStats.

<?xml version="1.0" encoding="UTF-8" ?>
<toolEventsDef>
	<!-- announcements -->
	<tool
		toolId="sakai.announcements"
		selected="true">
		<event eventId="annc.new" selected="true"/>
		<event eventId="annc.revise.own" selected="true"/>
		<event eventId="annc.revise.any" selected="true"/>
		<event eventId="annc.delete.own" selected="true"/>
		<event eventId="annc.delete.any" selected="true"/>
		<eventParserTip for="contextId" separator="/" index="3"/>
	</tool>
<!-- (...) -->
</toolEventsDef>

XML Fields Description

<TOOL> A Sakai tool
tool – toolId Sakai tool id
tool – selected Selected by default?
<EVENT> An event logged by the tool
tool – event – eventId Logged event id
tool – event – selected Selected by default?
<EVENTPARSERTIP> Parsing tip of the REF field for contextId (site id)
tool – eventParserTip – for Context id
tool – eventParserTip – separator String separator
tool – eventParserTip – index Index position

Example event reference for an Announcement logged event:
annc.new | /announcement/channel/~e65550f9-14c5-41ac-80be-a0657febd4ca/main

2.4. Enabling tracking of site visits


In Sakai 2.4.x / 2.5.x:
In order to be possible to track site visits in Sakai, the list of users present in site must be enabled (Sakai Presence service). If

SAK-8499

is not applied into your sakai installation (most probable), the following configuration key is required in sakai.properties:

display.users.present = true

In Sakai trunk / 2.6+:
The list of users present in site is not a requirement anymore (see

SAK-8499

) as long as the following configuration key is specified in sakai.properties:

presence.events.log = true

Common:
The tool will hide all visits related information if presence events are disabled in sakai.properties. However, you can force the enable/disable of visits related information in SiteStats:

Configuration key Description Default value
enableSiteVisits@org.sakaiproject.sitestats.api.StatsManager Force the enable/disable of display visits related information in the tool Tool checks if presence is enabled/disabled or if 'presence.events.log' property is set in Sakai to determine default value



2.5. External database configuration options

Version

This feature requires SiteStats version >= 1.2 or trunk.

Configuration key Description Version Default value
sitestats.db Whether to use internal Sakai database or external database (same or different server) for SiteStats tables. Possible values: internal, external 1.2+ internal
sitestats.externalDb.auto.ddl Set whether to execute a schema update after SessionFactory initialization 1.2+ true
sitestats.externalDb.hibernate.dialect Hibernate dialect for external db 1.2+ org.hibernate.dialect.HSQLDialect
driverClassName@org.sakaiproject.sitestats.externalDbDataSource Fully qualified Java class name of the JDBC driver for external db 1.2+ org.hsqldb.jdbcDriver
url@org.sakaiproject.sitestats.externalDbDataSource Connection URL to be passed to JDBC driver for external db connection 1.2+ jdbc:hsqldb:mem:sitestats_db
username@org.sakaiproject.sitestats.externalDbDataSource Username for external db 1.2+ sa
password@org.sakaiproject.sitestats.externalDbDataSource Password for external db 1.2+  

By default, the datasource connection pool is configured as follows:

  • initialSize = 3
  • maxActive = 5
  • maxIdle = 3
  • minIdle = 3
  • timeBetweenEvictionRunsMillis = -1
    More datasource options are available at the Apache Commons API javadocs page.



3. Other configuration options

3.1 Enabling tracking of Wiki page reads

Depending on

SAK-11214

resolution, you may need to either add a configuration key to sakai.properties (see jira) or manually perform the following change (with Sakai offline):

  1. open /rwiki-tool/tool/src/webapp/WEB-INF/commandComponents.xml
  2. set property trackReads of bean uk.ac.cam.caret.sakai.rwiki.tool.service.api.CommandService to true
  3. save the file and redeploy rwiki component
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.