Difference between revisions of "SUNScholar/Statistics/4.X"

From Libopedia
Jump to navigation Jump to search
(Created page with "<center> '''Back to SOLR Statistics''' </center> ==Introduction== SOLR statistics is enabled by default for the XMLUI in DSpace version 3.2 =...")
 
 
(17 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<center>
 
<center>
  '''[[SUNScholar/SOLR Statistics|Back to SOLR Statistics]]'''
+
  '''[[SUNScholar/SOLR_Statistics|Back to Default Statistics]]'''
 
</center>
 
</center>
 
==Introduction==
 
SOLR statistics is enabled by default for the XMLUI in DSpace version 3.2
 
 
===<font color="red">'''Please note:'''</font>===
 
''Before upgrading to DSpace 3.2, run SOLR statistics optimisation '''/home/dspace/bin dspace stats-util -o''' at least once just before the upgrade!''
 
  
 
==Step 1 - Setup SOLR config file==
 
==Step 1 - Setup SOLR config file==
 
Edit the following file:
 
Edit the following file:
  nano /home/dspace/<u>[[SUNScholar/Install_DSpace/S03#Step_3.2|source]]</u>/dspace/config/modules/solr-statistics.cfg
+
  nano $HOME/<u>[[SUNScholar/Install_DSpace/S03#Step_3.2|source]]</u>/dspace/config/modules/solr-statistics.cfg
Remove the port 8080 reference, see example below.
+
See example below.
 
<pre>
 
<pre>
 
#---------------------------------------------------------------#
 
#---------------------------------------------------------------#
Line 25: Line 19:
 
# on, by default, we are assuming a test configuration with
 
# on, by default, we are assuming a test configuration with
 
# tomcat still running on port 8080
 
# tomcat still running on port 8080
server = http://localhost/solr/statistics
+
server = ${solr.server}/statistics
  
 
# A comma-separated list that contains the bundles for which the bitstreams will be displayed
 
# A comma-separated list that contains the bundles for which the bitstreams will be displayed
Line 32: Line 26:
 
# control solr statistics querying to filter out spider IPs
 
# control solr statistics querying to filter out spider IPs
 
# false by default
 
# false by default
query.filter.spiderIp = true
+
#query.filter.spiderIp = false
  
 
# control solr statistics querying to look at "isBot" field to determine
 
# control solr statistics querying to look at "isBot" field to determine
Line 51: Line 45:
 
==Step 2 - Setup usage config file==
 
==Step 2 - Setup usage config file==
 
Edit the following file:
 
Edit the following file:
  nano /home/dspace/<u>[[SUNScholar/Install_DSpace/S03#Step_3.2|source]]</u>/dspace/config/modules/usage-statistics.cfg
+
  nano $HOME/<u>[[SUNScholar/Install_DSpace/S03#Step_3.2|source]]</u>/dspace/config/modules/usage-statistics.cfg
 
See example below.
 
See example below.
 
<pre>
 
<pre>
 
# The location for the Geo Database retrieved on update/installation
 
# The location for the Geo Database retrieved on update/installation
dbfile = /home/dspace/config/GeoLiteCity.dat
+
dbfile = ${dspace.dir}/config/GeoLiteCity.dat
  
 
# Timeout for the resolver in the DNS lookup
 
# Timeout for the resolver in the DNS lookup
Line 84: Line 78:
 
</pre>
 
</pre>
  
==Step 3 - Enable daily stats optimisation==
+
==Step 3 - Enable new configuration==
 +
To enable the new configuration, you would normally [[SUNScholar/Rebuild_DSpace|rebuild DSpace]].
 +
 
 +
Or you can copy the above config files to the following folder:
 +
#HOME/config/modules
 +
And then [[SUNScholar/Restart_DSpace|restart DSpace]].
 +
 
 +
==Step 4 - Enable daily stats optimisation==
 
#Go to: http://wiki.lib.sun.ac.za/index.php/SUNScholar/Daily_Admin
 
#Go to: http://wiki.lib.sun.ac.za/index.php/SUNScholar/Daily_Admin
 
#Check all the options for '''stats-util''' and enable.
 
#Check all the options for '''stats-util''' and enable.
 
+
[[Category:Customisation]]
==References==
 
*https://wiki.duraspace.org/display/DSDOC3x/DSpace+Statistics
 
*https://wiki.duraspace.org/display/DSDOC3x/Managing+Usage+Statistics
 
*https://wiki.duraspace.org/display/DSDOC3x/DSpace+Statistics#DSpaceStatistics-ManuallyInstalling/UpdatingGeoLiteDatabaseFile
 

Latest revision as of 15:47, 29 May 2016

Back to Default Statistics

Step 1 - Setup SOLR config file

Edit the following file:

nano $HOME/source/dspace/config/modules/solr-statistics.cfg

See example below.

#---------------------------------------------------------------#
#--------------SOLR STATISTICS CONFIGURATIONS-------------------#
#---------------------------------------------------------------#
# These configs are only used by the SOLR interface/webapp to   #
# track usage statistics.                                       #
#---------------------------------------------------------------#

##### Usage Logging #####
# set this to be the port you run the dspace "solr" webapp
# on, by default, we are assuming a test configuration with
# tomcat still running on port 8080
server = ${solr.server}/statistics

# A comma-separated list that contains the bundles for which the bitstreams will be displayed
query.filter.bundles=ORIGINAL

# control solr statistics querying to filter out spider IPs
# false by default
#query.filter.spiderIp = false

# control solr statistics querying to look at "isBot" field to determine
# if record is a bot. true by default.
#query.filter.isBot = true

# URLs to download IP addresses of search engine spiders from
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

Step 2 - Setup usage config file

Edit the following file:

nano $HOME/source/dspace/config/modules/usage-statistics.cfg

See example below.

# The location for the Geo Database retrieved on update/installation
dbfile = ${dspace.dir}/config/GeoLiteCity.dat

# Timeout for the resolver in the DNS lookup
# Time in milliseconds, defaults to 200 for backward compatibility
# Your system's default is usually set in /etc/resolv.conf and varies
# between 2 to 5 seconds, too high a value might result in Solr exhausting
# your connection pool
resolver.timeout = 1000

# Control if the statistics pages should be only shown to authorized users
# If enabled, only the administrators for the DSpaceObject will be able to
# view the statistics.
# If disabled, anyone with READ permissions on the DSpaceObject will be able
# to view the statistics.
#View/download statistics
authorization.admin.usage=false
#Search/search result statistics
authorization.admin.search=false
#Workflow result statistics
authorization.admin.workflow=false

# Enable/disable logging of spiders in solr statistics.
# If false, and IP matches an address in spiderips.urls, event is not logged.
# If true, event will be logged with the 'isBot' field set to true
# (see query.filter.* for query filter options)
# Default value is true.
logBots = false

Step 3 - Enable new configuration

To enable the new configuration, you would normally rebuild DSpace.

Or you can copy the above config files to the following folder:

#HOME/config/modules

And then restart DSpace.

Step 4 - Enable daily stats optimisation

  1. Go to: http://wiki.lib.sun.ac.za/index.php/SUNScholar/Daily_Admin
  2. Check all the options for stats-util and enable.