Skip to main content

EIDA nodes statistics aggregator

Project description

# EIDA Statistics aggregation

This project should provide unified statistics about EIDA nodes usage.

## Aggregating data

Each EIDA node prepares an aggregation of their logging file using the same script.

This aggregation result is sent to a central database through a webservice provided by a central node

### Install and execute

With pipenv, run

pipenv install pipenv shell python aggregator/eida_log_aggregation.py –help

For now, the log file from seiscomp is expected to be a list of JSON entries compressed with BZIP2.

### Exemples

Aggregate one bz2 seiscomp logfile:

python aggregator/eida_log_aggregation.py –node NIEP –output-file 20201102_NIEP fdsnws-requests.log.2020-11-02.bz2

Also available with stdin:

echo “fdsnws-requests.log.2020-11-02.bz2” | python aggregator/eida_log_aggregation.py –node NIEP –output-file 20201102_NIEP

You can also agregate several logfiles:

python aggregator/eida_log_aggregation.py –node NIEP –output-file 202011_NIEP fdsnws-requests.log.2020-11*.bz2

### Test

From the projet’s root directory run

pipenv install pipenv shell pytest

### Aggregation problems

#### The Count distinct problem

Some information requested by EIDA need to count distint occurences of information (an IP, a country). A naive approach counting distinct occurences on each day and each node can’t be used to count the distinct occurences at a global scale nor for another timewindow.

Enters HyperLogLog, an algorithm allowing to estimate occurences for different timeframe. hll is implemented in Python and PostgreSQL this is why this project uses both technologies.

#### Anonimization

We want to anonimize every data that can link to a person. This is why IP adresses are hashed using the same algorithm on each datacenter, in order to have consistant statistics.

## Ingesting data

A webservice receiving POST request and ingesting the result in a database

## Creating reports

This code create automatic reports from the database

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

eida-statistics-aggregator-0.2.0.tar.gz (5.8 kB view details)

Uploaded Source

File details

Details for the file eida-statistics-aggregator-0.2.0.tar.gz.

File metadata

  • Download URL: eida-statistics-aggregator-0.2.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for eida-statistics-aggregator-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ec488ee59c0531f8d053d134cd6cc8d2f1a96afcfbe0c02b01e1ae6972c59f1f
MD5 1dcb17b3eb8219c1816b2e1798852265
BLAKE2b-256 555efe07c988a8ebe63cf898fae20692442b7bc124e3e16482565253d95a21a9

See more details on using hashes here.

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