Skip to main content

A python library for sending usage stats events from Dspace to Matomo & ELK

Project description

============================ Dspace usage stats collector

.. image:: https://img.shields.io/pypi/v/dspace-stats-collector.svg :target: https://pypi.python.org/pypi/dspace-stats-collector

.. image:: https://img.shields.io/travis/lareferencia/dspace-stats-collector.svg :target: https://travis-ci.org/lareferencia/dspace-stats-collector

.. image:: https://readthedocs.org/projects/dspace-stats-collector/badge/?version=latest :target: https://dspace-stats-collector.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status

.. image:: https://img.shields.io/pypi/l/dspace-stats-collector.svg :target: https://pypi.python.org/pypi/dspace-stats-collector :alt: License

A python agent for sending DSpace usage statistics events to Matomo and ELK Stack.

Standalone user level installing (w/ python bundle)

This is the recommended installation method, the instalation script :

  • Downloads and install Miniconda (x86 or x64) a free minimal installer for conda/python (https://docs.conda.io/en/latest/miniconda.html) in CURRENT_USER_HOME/dspace-stats-collector directory.
  • Installs dspace-stats-collector requeriments and packages in the miniconda python enviroment
  • Creates a default configuration file in CURRENT_USER_HOME/dspace-stats-collector/config
  • Downloads lastest COUNTER Robots file

IMPORTANT: The instalation script and the dspace-stats-collector does not require superuser privileges and don´t install any software outside the CURRENT_USER_HOME/dspace-stats-collector. The collector script execute read only queries over dspace relational db and solr core. This tool doesn´t write or modify any dspace file, dspace db or solr core. It´s recommended, but not mandatory, execute the instalation script from de dspace user.

Installation steps:

  1. Check if wget and cron are installed in the system.
  2. Download installation script from: https://raw.githubusercontent.com/lareferencia/dspace-stats-collector/master/install-standalone.sh
  3. Execute installation script from a plain user (ie: dspace)
  4. Configure matomo site parameters provided in CURRENT_USER_HOME/dspace-stats-collector/config/default.properties
  5. Execute CURRENT_USER_HOME/dspace-stasts-collector/bin/dspace-stats-collector -v (will collect and send events for the first time)
  6. Check if the collector is sending data to matomo instance ( do not execute the next step without this check )
  7. Execute CURRENT_USER_HOME/dspace-stasts-collector/bin/dspace-stats-cronify (will install collector in user cron)
  8. Check/ajust the user crontab (the instalation script adds an entry automatically in the user crontab, the collector runs every 60 min by default)

Credits

This component is part of an alternative DSpace Usage Statistics collector strategy developed by LA Referencia / CONCYTEC (Perú) / IBICT (Brasil) / OpenAIRE as part of OpenAIRE Advance project - WP5 - Subtask 5.2.2. "Pilot common methods for usage statistics across Europe & Latin America"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dspace_stats_collector-0.3.1.tar.gz (36.1 kB view hashes)

Uploaded Source

Built Distribution

dspace_stats_collector-0.3.1-py2.py3-none-any.whl (20.3 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page