Difference between revisions of "SUNScholar/Statistics/Old Versions"
Jump to navigation
Jump to search
m (→References) |
|||
| (11 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
| + | <center> | ||
| + | '''[[SUNScholar/SOLR_Statistics|Back to Default Statistics]]''' | ||
| + | </center> | ||
| + | |||
| + | ==Requirements== | ||
| + | #If you have any existing SOLR data, ensure it is backed up before you begin the conversions below. | ||
| + | #Also ensure that any optimisations of the SOLR or log data are done before the conversion. | ||
==Log file conversion for DSpace versions <= 1.6.2== | ==Log file conversion for DSpace versions <= 1.6.2== | ||
===Convert the old log files=== | ===Convert the old log files=== | ||
| Line 5: | Line 12: | ||
#!/bin/sh | #!/bin/sh | ||
| − | cd | + | cd $HOME/log |
ITEM=`ls dspace.log.*` | ITEM=`ls dspace.log.*` | ||
#echo $ITEM | #echo $ITEM | ||
for i in $ITEM ; do | for i in $ITEM ; do | ||
| − | + | $HOME/bin/dspace stats-log-converter -i $i -o $i.solr | |
done | done | ||
</pre> | </pre> | ||
| Line 21: | Line 28: | ||
#!/bin/sh | #!/bin/sh | ||
| − | cd | + | cd $HOME/log |
ITEM=`ls *.solr` | ITEM=`ls *.solr` | ||
#echo $ITEM | #echo $ITEM | ||
| Line 28: | Line 35: | ||
echo "###################################" | echo "###################################" | ||
echo "Importing stats for log file:... $i" | echo "Importing stats for log file:... $i" | ||
| − | + | $HOME/bin/dspace stats-log-importer -i $i | |
done | done | ||
</pre> | </pre> | ||
| Line 37: | Line 44: | ||
Make sure that you run the stats programs regularly. | Make sure that you run the stats programs regularly. | ||
<pre> | <pre> | ||
| − | @daily | + | @daily $HOME/bin/stat-general |
| − | @daily | + | @daily $HOME/bin/stat-report-general |
| − | @monthly | + | @monthly $HOME/bin/stat-monthly |
| − | @monthly | + | @monthly $HOME/bin/stat-report-monthly |
</pre> | </pre> | ||
The above must be added to the [[SUNScholar/Daily_Admin|crontab]] for the "dspace" user. | The above must be added to the [[SUNScholar/Daily_Admin|crontab]] for the "dspace" user. | ||
| Line 58: | Line 65: | ||
</pre> | </pre> | ||
| − | + | ==References== | |
| + | *https://jira.duraspace.org/browse/DS-1531 | ||
| + | *https://wiki.duraspace.org/display/DSDOC3x/Managing+Usage+Statistics#ManagingUsageStatistics-DSpaceLogConverter | ||
| + | *https://wiki.duraspace.org/display/DSDOC3x/DSpace+Statistics#DSpaceStatistics-ManuallyInstalling/UpdatingGeoLiteDatabaseFile | ||
| + | *https://wiki.duraspace.org/display/DSDOC18/Managing+Usage+Statistics#ManagingUsageStatistics-DSpaceLogConverter | ||
| + | [[Category:Customisation]] | ||
Latest revision as of 15:46, 29 May 2016
Back to Default Statistics
Contents
Requirements
- If you have any existing SOLR data, ensure it is backed up before you begin the conversions below.
- Also ensure that any optimisations of the SOLR or log data are done before the conversion.
Log file conversion for DSpace versions <= 1.6.2
Convert the old log files
I prepared the following bash script to do the conversion.
#!/bin/sh cd $HOME/log ITEM=`ls dspace.log.*` #echo $ITEM for i in $ITEM ; do $HOME/bin/dspace stats-log-converter -i $i -o $i.solr done
After running the script you will have a lot of log files with the .solr extension. This takes quite a while with a lot of log files. Be patient.
Import the converted solr log files
I prepared the following bash script to do the import.
#!/bin/sh cd $HOME/log ITEM=`ls *.solr` #echo $ITEM for i in $ITEM ; do echo "###################################" echo "Importing stats for log file:... $i" $HOME/bin/dspace stats-log-importer -i $i done
This takes quite a while with a lot of log files. Be patient.
Statistics for DSpace versions <= 1.5.2
General Reports
Make sure that you run the stats programs regularly.
@daily $HOME/bin/stat-general @daily $HOME/bin/stat-report-general @monthly $HOME/bin/stat-monthly @monthly $HOME/bin/stat-report-monthly
The above must be added to the crontab for the "dspace" user.
Allow normal users to browse the statistics
Edit the following in the DSpace config file.
###### 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 = true
# directory where live reports are stored
report.dir = ${dspace.dir}/reports
References
- https://jira.duraspace.org/browse/DS-1531
- https://wiki.duraspace.org/display/DSDOC3x/Managing+Usage+Statistics#ManagingUsageStatistics-DSpaceLogConverter
- https://wiki.duraspace.org/display/DSDOC3x/DSpace+Statistics#DSpaceStatistics-ManuallyInstalling/UpdatingGeoLiteDatabaseFile
- https://wiki.duraspace.org/display/DSDOC18/Managing+Usage+Statistics#ManagingUsageStatistics-DSpaceLogConverter