Coder Social home page Coder Social logo

devonhk / quebec-monitoring Goto Github PK

View Code? Open in Web Editor NEW

This project forked from matthieucan/quebec-monitoring

0.0 2.0 0.0 5.02 MB

Dockerfile all-in-the-box, plugins and templates to monitor various metrics in Québec.

Home Page: http://quebec247.org

License: GNU Affero General Public License v3.0

Makefile 0.66% CSS 15.61% HTML 18.48% JavaScript 12.47% Python 52.78%

quebec-monitoring's Introduction

quebec-monitoring

Dockerfile all-in-the-box, plugins and templates to monitor various metrics in Québec.

Let's monitor Quebec! This work is inspired by http://iceland.adagios.org by @palli.

How to: run at home

Generate the configuration

  • (not mandatory) Fill the tokens needed for certain web services

    $ cp scripts/tokens.py.copyme scripts/tokens.py
    $ <your-favourite-editor> scripts/tokens.py
    

Run the Docker container

The only dependency is Docker, on Debian- or Ubuntu-based distros you can:

$ sudo apt-get install docker.io

For a list of all installation guides for Docker, visit http://docs.docker.com/installation/#installation

After cloning the repository, just do:

$ sudo make run

If you installed Docker manually, perhaps the command to run it is docker instead of docker.io. In this case, run sed -i s/docker.io/docker/g Makefile, or symlink docker.io to your docker binary.

And now, navigate to http://localhost:8080. Say hello to your instance!

What? You really use sudo? This looks dangerous.
In order to use Docker, admin rights are required. If you're not confident doing this, you can easily check that only the Ubuntu trusted image is downloaded, everything is built from it in the Dockerfile.
What does it install on my machine?
Nothing, except for Docker if you didn't have it already. Everything's installed in a container, which is more or less a virtual machine that you can throw away afterwards :-)
Is it really that simple to run?
Yes.

Analytics

If you want to host this and get analytics, adapt the Piwik configuration in apache-quebec.conf and app/app/index.html.

For an easy-to-setup Piwik in Docker, try https://github.com/matthieucan/Dockerfiles/piwik

How to: contribute

Everything here is based on:

  • back-end: the monitoring engine Shinken,
  • front-end: the Django application Adagios,
  • all-in-the-box: the container manager Docker.

If you want to add a metric in an existing category, you can add relevant information in scripts/<category>.py.

If you want to create a new category, create a script in scripts/<your-cool-idea>.py, and an entry in the Makefile.

The scripts are used to generate the Shinken configuration, which uses plugins. Most of the plugins are hosted on Open Build Service, a service from OpenSuse which allows us to build Debian packages, which are easier to install in the Docker container. If you need inspiration to write new plugins, check out their source code and our plugins library.

To have a nice development environment:

Please install npm sudo apt-get install npm

make dev will:

  • generate the configuration from your scripts/ (look in the Makefile),
  • bring you in an interactive Docker environment (where you can play with Shinken, Apache, and the various scripts),
  • map the frontend application from your harddrive to your container,
  • map the specific Quebec247 configuration from your harddrive to your container.

Now run service shinken start && service apache2 start in your container. Make changes to the scripts/*.py (backend) or app/* (frontend), run your scripts, restart Shinken in your container, and everything will be automatically updated!

Pull requests, patches, bug reports, feedback and pizzas are always welcome!

How to: contact us

If Github workflows (issues, pull-requests) are not suitable for you, or if you prefer to use traditional email, you can reach us through [email protected].

We're looking forward to hearing from you!

quebec-monitoring's People

Contributors

matthieucan avatar nilovna avatar titilambert avatar

Watchers

 avatar  avatar

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.