All Versions
- DSpace 7.x (Current Release)
- DSpace 8.x (Unreleased)
- DSpace 6.x (EOL)
- DSpace 5.x (EOL)
- More Versions...
...
Code Block |
---|
<field name="type" type="integer" indexed="true" stored="true" required="true" />
<field name="id" type="integer" indexed="true" stored="true" required="true" />
<field name="ip" type="string" indexed="true" stored="true" required="false" />
<field name="time" type="date" indexed="true" stored="true" required="true" />
<field name="epersonid" type="integer" indexed="true" stored="true" required="false" />
<field name="continent" type="string" indexed="true" stored="true" required="false"/>
<field name="country" type="string" indexed="true" stored="true" required="false"/>
<field name="countryCode" type="string" indexed="true" stored="true" required="false"/>
<field name="city" type="string" indexed="true" stored="true" required="false"/>
<field name="longitude" type="float" indexed="true" stored="true" required="false"/>
<field name="latitude" type="float" indexed="true" stored="true" required="false"/>
<field name="owningComm" type="integer" indexed="true" stored="true" required="false" multiValued="true"/>
<field name="owningColl" type="integer" indexed="true" stored="true" required="false" multiValued="true"/>
<field name="owningItem" type="integer" indexed="true" stored="true" required="false" multiValued="true"/>
<field name="dns" type="string" indexed="true" stored="true" required="false"/>
<field name="userAgent" type="string" indexed="true" stored="true" required="false"/>
<field name="isBot" type="boolean" indexed="true" stored="true" required="false"/>
<field name="bundleName" type="string" indexed="true" stored="true" required="false" multiValued="true" />
|
The combination of type and id determine which resource (either community, collection, item page or file download) has been requested.
...
In the {dspace.dir}/config/modules/solr-statistics.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).
Assuming you get an HTTP 200 OK response, then you should set | ||||
Property: | solr.spiderips spiderips.urls | ||||
Example Value: | solr. spiderips.urls =
| ||||
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="c1ee4a052b024019-e57eceb3-42114515-bba7b410-d7372fcc2dd25b29366c2932"><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.
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="16439cee1db15675-899e91d7-4cf245c4-9421bb14-f69154a3899e75a58fcee5d9"><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="59f3831820715021-f02f6ac9-4da84657-b9a491ab-a887afd41ef544e26ec1715f"><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="b15fdfaff37aa6ec-429fc514-4ac648cb-850fb5e5-3849ee79b4fc86a6c5e4eab2"><ac:plain-text-body><![CDATA[ | 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] | ]]></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: | query.filter.bundles |
Example | query.filter.bundles=ORIGINAL |
Informational | A comma seperated list that contains the bundles for which the file statistics will be displayed. |
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-<version>-build.dir
ant -Dconfig=[dspace]/config/dspace.cfg update
cp -R [dspace]/webapps/* [TOMCAT]/webapps
|
Wiki Markup |
---|
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: |
Code Block |
---|
cp -R dspace/webapps/solr TOMCAT/webapps
|
...
The following Dspace.cfg fields are only applicable to the older statistics solution.
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/
|
...
The command line interface (CLI) scripts can be used to clean the usage database from additional spider traffic and other maintenance tasks.
In DSpace 1.6.x & 1.7.x the file statistics where shown regardless of the bundle in which the file is 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
|
...