Giter Site home page Giter Site logo

drupal-monitoring's Introduction

Containers stack for Drupal monitoring

This project provides a full solution to monitor multiple Drupal hosts. The data gathering is mainly based on drush, the Drupal shell command line tool.

Prerequisites

This stack is based on docker, so you'll need to install it. Since it's a multi-container setup, another tool called docker-compose is used by the Makefile to manage the stack.

Usage

Demo

If you want to see what the project looks like, use the demonstration stack

make build-demo
make demo

The container stack will stop after initializing the Drupal site. You need to start it once again

make demo

Access the webui

Wait a few minutes for the monitoring system to be configured and to gather data from its plugins.

Production

To deploy Drupal monitoring using containers, these are the steps you need to follow:

SSH key

The Alignak container needs a RSA private key to use remote drush on the Drupal server. Put the private key in container/alignak/ssh. This directory will be mounted at runtime in /home/alignak.

Drush alias

Also, put the alias config files used for remote drush call in container/alignak/aliases.

Selenium scenario

The Alignak container also needs a selenium scenario in order to perform a selenium check. More informations about how to record a scenario is available here

Monitoring system configuration

Then, you need to configure the monitoring system by editing docker-compose-production.yml. In the surveilclient entry, set the environment variables accordingly.

VARIABLE MEANING
HOST_ADDR Host address to monitor
DRUPAL_ALIAS Alias name that drush will use
JENKINS The jenkins job URL
SELENIUM_SCENARIO The selenium scenario name (without .py)

You can configure only one host that way. If you want to configure multiple hosts, edit the init.sh file in container/surveilclient/. Copy and paste surveil config-host-create command to add more host. The options are pretty straight forward. If you need more information about the custom fields, they are defined in linux-drupal pack that is hosted here

The surveil client documentation is available here

Start the stack

To start the stack :

make production

You need to wait a little more than one minute before the monitoring system is properly configured. Then, the monitoring system needs to perform his first checks. You can force that via the Alignak webui at :

http://localhost:7767/all

Web ui

Once the first checks have been performed, go here to access the web ui.

Persistent data

Please note that there's some persitent data (for mongo and influxDB) located in the container-data. If you want a fresh start, delete it :

make remove-data

Development

The development setup mounts the nagios plugins from the host disk. It expects monitoring-tools project as your drupal-monitoring root sibling. That means that it will mount plugins from ../monitoring-tools.

You can clone this repository from https://github.com/savoirfairelinux/monitoring-tools

To start the stack :

make

The first time you run it, the stack will stop after initializing the Drupal site. Start it again :

make develop

After that, you need to clone the Bansho project where ever you want :

git clone [email protected]:stackforge/bansho.git

Then, from the Bansho directory, run :

make build
make drupal

Now, everything is up and running. However, you'll have to wait about one minute before the configuration is sent to Alignak.

Bansho : localhost:8888

Drupal : localhost:80

Alignak : localhost:7767

Surveil : localhost:8080

drupal-monitoring's People

Contributors

freddrickk avatar

Stargazers

Peter Carrero avatar Aleksandr Komm avatar Samy RANAVELA avatar Philippe Dagenais avatar Alexandre Viau avatar

Watchers

Maxime Dupuis avatar James Cloos avatar Alexandre Lision avatar Alexandre Viau avatar  avatar Flavien Peyre avatar David Barbeau avatar  avatar

Forkers

ssirois

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.