Giter Club home page Giter Club logo

stats-service's People

Contributors

cedricbonhomme avatar dependabot[bot] avatar jfrocha avatar ruslanbaidan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

remil1000

stats-service's Issues

Pub/Sub mechanism with ZeroMQ

The service is already providing an API but it could be convenient to provide a ZeroMQ feed.
It can for example be used to publish new stats to subscribers (like a live dashboard) or to synchronize several stats-api instances.

Check the format of the data submitted to the stats endpoint.

It would be safer to check the format of stats sent to Stats Service. The function to check the format is already implemented, partly.

This would prevent the processors from failing when trying to evaluate stats based on data with some missing properties.

Example:

[
    {
        "anr": "0a3ca941-35e1-42f7-8003-9b7bfa03cc2d",
        "type": "vulnerability",
        "date": "2021-03-05",
        "data": [
     {
        "averageRate": "3",
        "count": 1,
        "label1": "Mauvais dimensionnement des dispositifs de secours énergie (onduleur, batteries...)",
        "label2": "Incorrect sizing of emergency power supply equipment (inverter, batteries, etc.)",
        "label3": "Schlechte Dimensionierung der Notversorgungseinheiten (Wechselrichter, Batterien usw.)",
        "label4": "Verkeerde dimensionering van de noodvoedingssystemen (omzetter, batterijen ...)",
        "maxRisk": 6,
        "uuid": "69fc280e-4591-11e9-9173-0800277f0571"
      }
        ]
    }
]

It will check the format of the value of the data field.
For example if the key "uuid" is missing, the stats must not be accepted. Else the processors.

Error in Docker-compose volume mount

Describe the bug
When installing the Stats service using Docker Compose, the following error message is issued.

[+] Building 0.0s (0/0)                                                                                                  
[+] Running 0/0
 ⠋ Container statsservice  Creating                                                                                 0.0s 
Error response from daemon: invalid mount config for type "volume": invalid mount path: 'statsservice/static' mount path must be absolute

To Reproduce
Steps to reproduce the behavior:

  1. follow the installation instructions
  2. git clone https://github.com/monarc-project/stats-service
  3. cd stats-service/
  4. docker-compose up -d

Expected behavior
Starting the Docker container without error message during mount

Desktop (please complete the following information):

Questions Answers
Type of issue Bug
OS version (server) Ubuntu 22.04
Docker version 24.0.1, build 6802122
Docker Compose Version v2.18.1

Adding a geolocation attribute to client model

MONARC Stats Service, the service behind dashboard.monarc.lu, operated by CASES Luxembourg, aims to provide relevant data about the current cybersecurity trends, focused in the Luxembourg area. This is inherent to the core mission of CASES and the fact that most of MONARC users are located in the Luxembourg Greater Region. However, MONARC is used more and more and all over the world. And threats can vary around the world. This is why it could be nice to add a geolocation attribute to clients (not necessary something precise - city or region level is enough). This attribute could be set via a form by the users.

Also it would be simply useful to be able to filter out data from some users (with a cybersecurity geographical context too much different). After all, we are using a .lu TLD.
These filtered data could still be displayed, but why not on a map (OpenStreet map)...

Originally posted by @cedricbonhomme in #7

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.