Unsupported Release
This documentation relates to an old, unsupported version of DSpace, version 1.7.x. Looking for another version? See all documentation.
As of January 2014, the DSpace 1.7.x platform is no longer supported. We recommend upgrading to a more recent version of DSpace.
DSpace Statistics
DSpace uses the Apache Solr application underlaying the statistics. There is no need to download any separate software. All the necessary software is included.
Usage Event Logging and Usage Statistics Gathering
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.
Configuration settings for Statistics
In the dspace.cfg file review the following fields to make sure they are uncommented:
Property: |
solr.log.server |
||
Example Value: |
solr.log.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). wget http://127.0.0.1/solr/statistics/select?q=*:* Assuming you get an HTTP 200 OK response, then you should set |
||
Property: |
solr.spiderips.urls |
||
Example Value: |
solr.spiderips.urls = 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, \ http://iplists.com/non_engines.txt |
||
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="10c8c720-ea22-4f46-9dc7-e586aa44a096"><ac:plain-text-body><![CDATA[ |
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. dspace stats-util -h <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="0e86f0a9-97b2-42b3-bfb2-80c0150fb5f7"><ac:plain-text-body><![CDATA[from your [dspace]/bin directory |
]]></ac:plain-text-body></ac:structured-macro> |
Property: |
solr.dbfile |
||
Example Value: |
solr.dbfile = ${dspace.dir}/config/GeoLiteCity.dat |
||
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="a032899f-ad50-4218-b85f-5179c7697cb1"><ac:plain-text-body><![CDATA[ |
Informational Note: |
The following referes to the GeoLiteCity database file utilized by the LocationUtils to calculate the location of client requests based on IP address. During the Ant build process (both fresh_install and update) this file will be downloaded from [http://www.maxmind.com/app/geolitecity] if a new version has been published or it is absent from your [dspace]/config directory. |
]]></ac:plain-text-body></ac:structured-macro> |
Property: |
solr.resolver.timeout |
||
Example Value: |
solr.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 |
||
Example Value: |
useProxies = true |
||
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="e656a7b3-3b7c-4c2d-8759-26115c755e25"><ac:plain-text-body><![CDATA[ |
Informational Note: |
Will cause Statistics lohging to look for X-Forward URI to detect clients IP that have accessed it through a Proxy service. Allows detection of client IP when accessing DSpace. [Note: This setting is found in the DSpace Logging sesction of dspace.cfg] |
]]></ac:plain-text-body></ac:structured-macro> |
Property: |
statistics.item.authorization.admin |
||
Example Value: |
statistics.item.authorization.admin = true |
||
Informational Note: |
When set to true, only general administrators, collection and community administrators are able to access the 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: |
solr.statistics.logBots |
||
Example Value: |
solr.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: |
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 Name |
Default Value |
Type |
Description |
||
---|---|---|---|---|---|
solr.log.server |
${dspace.baseUrl}/solr/statistics |
String |
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). wget http://127.0.0.1/solr/statistics/select?q=*:* Assuming you get an HTTP 200 OK response, then you should set |
||
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="ad200fd6-a2e9-4cfb-a758-e50a759f5b66"><ac:plain-text-body><![CDATA[ |
solr.spiderips.urls |
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, \ http://iplists.com/non_engines.txt |
String |
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. dspace stats-util -h <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="81f1818c-8d46-41a1-956b-00885fbb69d8"><ac:plain-text-body><![CDATA[from your [dspace]/bin directory |
]]></ac:plain-text-body></ac:structured-macro> |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="fa41f4b3-d696-4b41-ab5f-02eb9a1a7c6a"><ac:plain-text-body><![CDATA[ |
solr.dbfile |
${dspace.dir}/config/GeoLiteCity.dat |
String |
The following referes to the GeoLiteCity database file utilized by the LocationUtils to calculate the location of client requests based on IP address. During the Ant build process (both fresh_install and update) this file will be downloaded from [http://www.maxmind.com/app/geolitecity] if a new version has been published or it is absent from your [dspace]/config directory. |
]]></ac:plain-text-body></ac:structured-macro> |
solr.resolver.timeout |
200 |
Integer |
Timeout in milliseconds for DNS resolution of origin hosts/IPs. Setting this value too high may result in solr exhausting your connection pool. |
||
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="a371935a-5edf-4942-8c58-628d406b5e09"><ac:plain-text-body><![CDATA[ |
useProxies |
true |
boolean |
Will cause Statistics loging to look for X-Forward URI to detect clients IP that have accessed it through a Proxy service. Allows detection of client IP when accessing DSpace. [Note: This setting is found in the DSpace Logging sesction of dspace.cfg] |
]]></ac:plain-text-body></ac:structured-macro> |
statistics.item.authorization.admin |
true |
boolean |
Enables access control restriction on DSpace Statistics pages, Restrictions are based on access rights to Community, Collection and Item Pages. This will require the user to sign on to see that statistics. Setting the statistics to "false" will make them publicly available. |
||
solr.statistics.logBots |
true |
boolean |
If false, and IP is detected as a spider, the event is not logged. |
||
solr.statistics.query.filter.spiderIp |
false |
boolean |
If true, statistics queries will filter out spider IPs -- use with caution, as this often results in extremely long query strings. |
||
solr.statistics.query.filter.isBot |
true |
boolean |
If true, statistics queries will filter out events flagged with the "isBot" field. This is the recommended method of filtering spiders from statistics. |
Upgrade Process for Statistics.
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
cd [dspace-source]/dspace mvn package cd [dspace-source]/dspace/target/dspace-<version>-build.dir ant -Dconfig=[dspace]/config/dspace.cfg update cp -R [dspace]/webapps/* [TOMCAT]/webapps
The last step is only used if you are not mounting [dspace]/webapps directly into your Tomcat, Resin or Jetty host (the recommended practice)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:
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)
Older setting that are no currently utilized in the reports
Are the following Dspace.cfg fields still used by the new 1.6 Statistics? If not, we need to either document this well or remove them altogether:
###### 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