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
  • Installs dspace-stats-collector script in the user crontab

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.2.4.tar.gz (35.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dspace_stats_collector-0.2.4-py2.py3-none-any.whl (19.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file dspace_stats_collector-0.2.4.tar.gz.

File metadata

  • Download URL: dspace_stats_collector-0.2.4.tar.gz
  • Upload date:
  • Size: 35.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.0

File hashes

Hashes for dspace_stats_collector-0.2.4.tar.gz
Algorithm Hash digest
SHA256 bc258daaf54b58db1fd1e68fc49056ca8f8fe803a41ed3b779209597d16ef38f
MD5 4490cc3fa0603be4bc95a9313a0cb653
BLAKE2b-256 a4c6d226a1401781809d4326a617efa047e3d4e3135295f2937883c3192030a5

See more details on using hashes here.

File details

Details for the file dspace_stats_collector-0.2.4-py2.py3-none-any.whl.

File metadata

  • Download URL: dspace_stats_collector-0.2.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 19.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.0

File hashes

Hashes for dspace_stats_collector-0.2.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 dd0890005535e0214054d363e32ca7a229572105a3aaba94ab197c8ad7f172ac
MD5 64901820c33306085fc0c0b0ef6507e5
BLAKE2b-256 fee17ed642821f483873adb4e58bd9ad738f6e7053089afa1362edf78aea2563

See more details on using hashes here.

Supported by

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