All Versions
- DSpace 7.x (Current Release)
- DSpace 8.x (Unreleased)
- DSpace 6.x (EOL)
- DSpace 5.x (EOL)
- More Versions...
DSpace 1.6 and newer versions uses the Apache SOLR application underlying the statistics. SOLR enables performant searching and adding to vast amounts of (usage) data.
Unlike previous versions, enabling statistics in DSpace does not require additional installation or customization. All the necessary software is included.
...
DSpace 1.6 and newer
After the introduction of the SOLR Statistics logging in DSpace 1.6, every pageview and file download is logged in a dedicated SOLR statistics core.DSpace 3.0 and newer
In addition to the already existing logging of pageviews and downloads, DSpace 3.0 now also logs search queries users enter in the DSpace search dialog and workflow events.
Warning | |||
---|---|---|---|
| |||
In DSpace 7.0, only usage statistics (pageview, downloads) are logged. Search statistics and workflow reports (which were available in v6) are not yet supported, but are both scheduled to be restored in a later 7.x release (currently 7.1 for workflow reports, and 7.2 for search statistics), see DSpace Release 7.0 StatusDue to the very recent addition of Discovery for search & faceted browsing in JSPUI, these search queries are not yet logged. Regular (non-discovery) search queries are being logged in JSP UI. |
Warning | ||
---|---|---|
| ||
Only workflow events, initiated and executed by a physical user are being logged. Automated workflow steps or ingest procedures are currently not being logged by the workflow events logger. |
...
In the XMLUIUI, pageview and download statistics can be accessed from the lower end of the "Statistics" navigation menu . In the JSPUI, a view statistics button appears on the bottom of pages for which statistics are availablenear the header. That statistics page is "context aware", so it will show the usage statistics for whatever page (site, Community, Collection) you are currently on.
If you are not seeing these links or buttonsthe menu, it's likely that they are only enabled for administrators in your installation. Change the configuration parameter "authorization.admin.usage" in usage-statistics.cfg to false in order to make statistics visible for all repository visitors.
...
In the XMLUI, search query statistics can be accessed from the lower end of the navigation menu.
If you are not seeing the link labelled "search statistics", it is likely that they are only enabled for administrators in your installation. Change the configuration parameter "authorization.admin.search" in usage-statistics.cfg to false in order to make statistics visible for all repository visitors.
The dropdown on top of the page allows you to modify the time frame for the displayed statistics.
The Pageviews/Search column tracks the amount of pages visited after a particular search term. Therefor a zero in this column means that after executing a search for a specific keyword, not a single user has clicked a single result in the list.
If you are using Discovery, note that clicking the facets also counts as a search, because clicking a facet sends a search query to the Discovery index.
In the XMLUI, search query statistics can be accessed from the lower end of the navigation menu.
If you are not seeing the link labelled "Workflow statistics", it is likely that they are only enabled for administrators in your installation. Change the configuration parameter "authorization.admin.workflow" in usage-statistics.cfg to false in order to make statistics visible for all repository visitors.
The dropdown on top of the page allows you to modify the time frame for the displayed statistics.
The DSpace Statistics Implementation is a Client/Server architecture based on Solr for collecting usage events in the JSPUI and XMLUI user interface applications of DSpace. Solr runs as a separate webapplication and an instance of Apache Http Client is utilized to allow parallel requests to log statistics events into this Solr instance.
In the {dspace.dir}/config/modules/solr-statistics.cfg
file review the following fields. These fields can be edited in place, or overridden in your own local.cfg config file (see Configuration Reference).
Warning | ||
---|---|---|
| ||
Search query statistics are not supported in 7.0, but are scheduled to be released in a later 7.x release (currently 7.2), see DSpace Release 7.0 Status. The below screenshots and instructions are for 6.x and will need updating for 7.x once this feature is completed. |
In the UI, search query statistics can be accessed from the lower end of the navigation menu.
If you are not seeing the link labelled "search statistics", it is likely that they are only enabled for administrators in your installation. Change the configuration parameter "authorization.admin.search" in usage-statistics.cfg to false in order to make statistics visible for all repository visitors.
The dropdown on top of the page allows you to modify the time frame for the displayed statistics.
The Pageviews/Search column tracks the amount of pages visited after a particular search term. Therefor a zero in this column means that after executing a search for a specific keyword, not a single user has clicked a single result in the list.
If you are using Discovery, note that clicking the facets also counts as a search, because clicking a facet sends a search query to the Discovery index.
Warning | ||
---|---|---|
| ||
Workflow event statistics are not supported in 7.0, but are scheduled to be released in a later 7.x release (currently 7.1), see DSpace Release 7.0 Status. The below screenshots and instructions are for 6.x and will need updating for 7.x once this feature is completed. |
In the UI, search query statistics can be accessed from the lower end of the navigation menu.
If you are not seeing the link labelled "Workflow statistics", it is likely that they are only enabled for administrators in your installation. Change the configuration parameter "authorization.admin.workflow" in usage-statistics.cfg to false in order to make statistics visible for all repository visitors.
The dropdown on top of the page allows you to modify the time frame for the displayed statistics.
The DSpace Statistics Implementation is a Client/Server architecture based on Solr for collecting usage events in the JSPUI and XMLUI user interface applications of DSpace. Solr runs as a separate webapplication and an instance of Apache Http Client is utilized to allow parallel requests to log statistics events into this Solr instance.
In the {dspace.dir}/config/modules/solr-statistics.cfg
file review the following fields. These fields can be edited in place, or overridden in your own local.cfg config file (see Configuration Reference).
Property: | solr-statistics.server | |||||||
Example Values: | solr-statistics.server = | |||||||
Property: | solr-statistics.server | |||||||
Example Values: | solr-statistics.server = http://127.0.0.1/solr/statistics | |||||||
Informational Note: | Is used by the SolrLogger Client class to connect to the Solr server over http and perform updates and queries. In most cases, this can (and should) be set to localhost (or 127.0.0.1). To determine the correct path, you can use a tool like wget to see where Solr is responding on your server. For example, you'd want to send a query to Solr like the following:
Assuming you get an HTTP 200 OK response, then you should set | Property:
| query.filter.bundles||||||
Example | solr-statistics.query.filter.bundles=ORIGINAL | |||||||
Informational | A comma seperated list that contains the bundles for which the file statistics will be displayed. | |||||||
Property: | solr-statistics.query.filter.spiderIp | |||||||
Example Value: | solr-statistics.query.filter.spiderIp = false | |||||||
Informational Note: | If true, statistics queries will filter out spider IPs -- use with caution, as this often results in extremely long query strings. | |||||||
Property: | solr-statistics.query.filter.isBot | |||||||
Example Value: | solr-statistics.query.filter.isBot = true | |||||||
Informational Note: | If true, statistics queries will filter out events flagged with the "isBot" field. This is the recommended method of filtering spiders from statistics. | |||||||
Property: | solr-statistics.autoCommit | |||||||
server = ${solr.server}/statistics | ||||||||
Informational Note: | Is used by the SolrLogger Client class to connect to the Solr server over http and perform updates and queries. In most cases, this can (and should) be set to localhost (or 127.0.0.1).
Assuming you get an HTTP 200 OK response, then you should set | |||||||
Property: | solr-statistics.query.filter.bundles | |||||||
Example Value: | solr-statistics. autoCommit = truequery.filter.bundles=ORIGINAL | |||||||
Informational | A comma seperated list that contains the bundles for which the file statistics will be displayed. | |||||||
If true (default), then all view statistics will be committed to Solr whenever the next autoCommit is triggered. This is recommended behavior. If false, then view statistics will be committed to Solr immediately (i.e. via an explicit commit call). This setting is untested in Production scenarios, and is primarily used by automated integration tests (to verify that the statistics engine is working properly). | Property: | solr-statistics. | spideripsquery.filter. | urlsspiderIp | ||||
Example Value: | solr-statistics. | spideripsquery.filter. | urls spiderIp = |
Code Block |
---|
http://iplists.com/google.txt, \
http://iplists.com/inktomi.txt, \
http://iplists.com/lycos.txt, \
http://iplists.com/infoseek.txt, \
http://iplists.com/altavista.txt, \
http://iplists.com/excite.txt, \
http://iplists.com/misc.txt
|
Informational Note:
Code Block |
---|
dspace stats-util -h
|
from your [dspace]/bin directory
In the {dspace.dir}/config/modules/usage-statistics.cfg
file review the following fields. These fields can be edited in place, or overridden in your own local.cfg config file (see Configuration Reference).
false | |||
Informational Note: | If true, statistics queries will filter out spider IPs -- use with caution, as this often results in extremely long query strings. | ||
Property: | solr-statistics.query.filter.isBot | ||
Example Value: | solr-statistics.query.filter.isBot = true | ||
Informational Note: | If true, statistics queries will filter out events flagged with the "isBot" field. This is the recommended method of filtering spiders from statistics. | ||
Property: | solr-statistics.autoCommit | ||
Example Value: | solr-statistics.autoCommit = true | ||
Informational Note: | If true (default), then all view statistics will be committed to Solr whenever the next autoCommit is triggered. This is recommended behavior. If false, then view statistics will be committed to Solr immediately (i.e. via an explicit commit call). This setting is untested in Production scenarios, and is primarily used by automated integration tests (to verify that the statistics engine is working properly). | ||
Property: | solr-statistics.spiderips.urls | ||
Example Value: | solr-statistics.spiderips.urls =
| ||
Informational Note: | List of URLs to download spiders files into [dspace]/config/spiders. These files contain lists of known spider IPs and are utilized by the SolrLogger to flag usage events with an "isBot" field, or ignore them entirely.
from your [dspace]/bin directory |
In the {dspace.dir}/config/modules/usage-statistics.cfg
file review the following fields. These fields can be edited in place, or overridden in your own local.cfg config file (see Configuration Reference).
Property: | usage-statistics.dbfile | |||
Example Value: | usage-statistics.dbfile = ${dspace.dir}/config/GeoLite2-City.mmdb | |||
Informational Note: | References the location of the installed GeoLite or DB-IP City "mmdb" database file. This file is utilized by the LocationUtils to calculate the location of client requests based on IP address. | |||
Property: | usage-statistics.dbfile | |||
Example Value: | usage-statistics.dbfile = ${dspace.dir}/config/GeoLite2-City.mmdb | Informational Note: | References the location of the installed GeoLite or DB-IP City "mmdb" database file. This file is utilized by the LocationUtils to calculate the location of client requests based on IP address.||
Property: | usage-statistics.resolver.timeout | |||
Example Value: | usage-statistics.resolver.timeout = 200 | |||
Informational Note: | Timeout in milliseconds for DNS resolution of origin hosts/IPs. Setting this value too high may result in solr exhausting your connection pool. | |||
Property: | useProxies (Set in dspace.cfg) | |||
Example Value: | useProxies = true | |||
Informational Note: | Will cause Statistics logging to look for X-Forward URI to detect clients IP that have accessed it through a Proxy service (e.g. the Apache mod_proxy). Allows detection of client IP when accessing DSpace. [Note: This setting is found in the DSpace Logging section of dspace.cfg] | |||
Property: | usage-statistics.authorizationresolver.admin.usagetimeout | |||
Example Value: | usage-statistics.authorizationresolver.admin.usage timeout = true200 | |||
Informational Note: | When set to true, only general administrators, collection and community administrators are able to access the pageview and download statistics from the web user interface. As a result, the links to access statistics are hidden for non logged-in admin users. Setting this property to "false" will display the links to access statistics to anyone, making them publicly availableTimeout in milliseconds for DNS resolution of origin hosts/IPs. Setting this value too high may result in solr exhausting your connection pool. | |||
Property: | usage-statistics.authorization.admin.searchuseProxies (Set in dspace.cfg) | |||
Example Value: | usage-statistics.authorization.admin.search useProxies = true | |||
Informational Note: | When set to true, only system, collection or community administrators are able to access statistics on search queries. Will cause Statistics logging to look for X-Forward URI to detect clients IP that have accessed it through a Proxy service (e.g. the Apache mod_proxy). Allows detection of client IP when accessing DSpace. [Note: This setting is found in the DSpace Logging section of dspace.cfg] | |||
Property: | usage-statistics.authorization.admin. | workflowusage | ||
Example Value: | usage-statistics.authorization.admin. | workflow usage = true | ||
Informational Note: | When When set to true, only | systemgeneral administrators, collection | or and community administrators are able to access | statistics on workflow eventsthe pageview and download statistics from the web user interface. As a result, the links to access statistics are hidden for non logged-in admin users. Setting this property to "false" will display the links to access statistics to anyone, making them publicly available. |
Property: | usage-statistics. | logBotsauthorization.admin.search | ||
Example Value: | usage-statistics. | logBots authorization.admin.search = true | ||
Informational Note: | When | this property isset to | false, and IP is detected as a spider, the event is not logged.true, only system, collection or community administrators are able to access statistics on search queries. | |
Property: | usage-statistics. | shardedByYearauthorization.admin.workflow | ||
Example Value: | usage-statistics.authorization. shardedByYearadmin.workflow = falsetrue | |||
Informational Note: | When When set to " true", the DSpace statistics engine will look for additional Solr Shards (per year) when compiling all usage statistics. Therefore, if you are regularly running "stats-utils -s" (as documented in the "Solr Sharding By Year" section of the "SOLR Statistics Maintenance" page), then you should set this to "true". By default, it is "false", which tells the statistics engine to only compile usage statistics based on what is found in the current Solr core. |
Older versions of DSpace featured static reports generated from the log files. They still persist in DSpace today but are completely independent from the SOLR based statistics.
The following configuration parameters applicable to these reports can be found in dspace.cfg.
Code Block |
---|
###### Statistical Report Configuration Settings ######
# should the stats be publicly available? should be set to false if you only
# want administrators to access the stats, or you do not intend to generate
# any
report.public = false
# directory where live reports are stored
report.dir = ${dspace.dir}/reports/
|
These fields are not used by the new 1.6 Statistics, but are only related to the Statistics from previous DSpace releases
Example of rebuild and redeploy DSpace (only if you have configured your distribution in this manner)
First approach the traditional DSpace build process for updating
Code Block |
---|
cd [dspace-source]/dspace
mvn package
cd [dspace-source]/dspace/target/dspace-installer
ant -Dconfig=[dspace]/config/dspace.cfg update
cp -R [dspace]/webapps/* [TOMCAT]/webapps
|
The last step is only used if you do not follow the recommended practice of configuring [dspace]/webapps as location for webapps in your servlet container (Tomcat, Resin or Jetty). If you only need to build the statistics, and don't make any changes to other web applications, you can replace the copy step above with:
Code Block |
---|
cp -R dspace/webapps/solr TOMCAT/webapps
|
Again, only if you are not mounting [dspace]/webapps directly into your Tomcat, Resin or Jetty host (the recommended practice)
Restart your webapps (Tomcat/Jetty/Resin)
If you have upgraded from a previous version of DSpace, converting older log files ensures that you carry over older usage stats from before the upgrade.
The command line interface (CLI) scripts can be used to clean the usage database from additional spider traffic and other maintenance tasks. In DSpace 3.0, a script has been added to split up the monolithic SOLR core into individual cores each containing a year of statistics.
In DSpace 1.6.x & 1.7.x the file download statistics were generated without regard to the bundle in which the file was located. In DSpace 1.8.0 it is possible to configure the bundles for which the file statistics are to be shown by using the query.filter.bundles property. If required the old file statistics can also be upgraded to include the bundle name so that the old file statistics are fixed.
Warning | ||
---|---|---|
| ||
Applying this change will involve dumping all the old file statistics into a file and re uploading these. Therefore it is wise to create a backup of the {dspace.dir}/solr/statistics/data directory. It is best to create this backup when the Tomcat/Jetty/Resin server program isn't running. |
When a backup has been made start the Tomcat/Jetty/Resin server program.
The update script has one optional command which will if given not only update the broken file statistics but also delete file statistics for files that where removed from the system (if this option isn't active these statistics will receive the "BITSTREAM_DELETED" bundle name).
Code Block |
---|
#The -r is optional
[dspace]/bin/dspace stats-util -b -r
|
If required, the solr server can be optimized by running
Code Block |
---|
{dspace.dir}/bin/stats-util -o
|
More information on how these solr server optimizations work can be found here: http://wiki.apache.org/solr/SolrPerformanceFactors#Optimization_Considerations.
In DSpace 1.6.x, each solr event was committed to the solr server individually. For high load DSpace installations, this would result in a huge load of small solr commits resulting in a very high load on the solr server.
This has been resolved in dspace 1.7 by only committing usage events to the solr server every 15 minutes. This will result in a delay of the storage of a usage event of maximum 15 minutes. If required, this value can be altered by changing the maxTime property in the
Code Block |
---|
{dspace.dir}/solr/statistics/conf/solrconfig.xml
|
Modify line 205 in the StatisticsTransformer.java file
-6 is the default setting, displaying the past 6 months of statistics. When reducing this to a smaller natural number, less months are being displayed.
Related: DatasetTimeGenerator Javadoc
, only system, collection or community administrators are able to access statistics on workflow events. | |
Property: | usage-statistics.logBots |
Example Value: | usage-statistics.logBots = true |
Informational Note: | When this property is set to false, and IP is detected as a spider, the event is not logged. |
Property: | usage-statistics.shardedByYear |
Example Value: | usage-statistics.shardedByYear = false |
Informational Note: | When set to "true", the DSpace statistics engine will look for additional Solr Shards (per year) when compiling all usage statistics. Therefore, if you are regularly running "stats-utils -s" (as documented in the "Solr Sharding By Year" section of the "SOLR Statistics Maintenance" page), then you should set this to "true". By default, it is "false", which tells the statistics engine to only compile usage statistics based on what is found in the current Solr core. |
Warning | ||
---|---|---|
| ||
Log-based statistics not supported in 7.0. They are under discussion as this feature is not widely used. Tentatively they are scheduled for a possible release/replacement in 7.1, see DSpace Release 7.0 Status. |
Older versions of DSpace featured static reports generated from the log files. They still persist in DSpace today but are completely independent from the SOLR based statistics.
The following configuration parameters applicable to these reports can be found in dspace.cfg.
Code Block |
---|
###### Statistical Report Configuration Settings ######
# should the stats be publicly available? should be set to false if you only
# want administrators to access the stats, or you do not intend to generate
# any
report.public = false
# directory where live reports are stored
report.dir = ${dspace.dir}/reports/
|
These fields are not used by the new 1.6 Statistics, but are only related to the Statistics from previous DSpace releases
If you have upgraded from a previous version of DSpace, converting older log files ensures that you carry over older usage stats from before the upgrade.
The command line interface (CLI) scripts can be used to clean the usage database from additional spider traffic and other maintenance tasks. As of DSpace 3.0, a script has been added to split up the monolithic SOLR core into individual cores each containing a year of statistics.
...
Code Block |
---|
http://localhost:80808983/solr/statistics/select?indent=on&version=2.2&start=0&rows=10&fl=*%2Cscore&qt=standard&wt=standard&explainOther=&hl.fl=&facet=true&facet.field=epersonid&q=type:0 |
...