Skip to content

OVERWATCH provides real time detector monitoring and QA for ALICE

License

Notifications You must be signed in to change notification settings

chughes90/OVERWATCH

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OVERWATCH

Welcome to ALICE Overwatch*, a project to provide real-time online data monitoring and quality assurance using timestamped data from the ALICE High Level Trigger (HLT) and Data Quality Monitoring (DQM).

Quick Start

Setup Overwatch

Along with a variety of dependencies which can be handled by pip, ROOT is required. ROOT 6 is recommended.

Local development

To setup for local development is also straightforward.

$ git clone https://github.com/raymondEhlers/OVERWATCH.git overwatch
$ cd overwatch
# Probably best to do this in a virtualenv
$ pip install -r requirements.txt
# Install webApp static data (Google Polymer and jsRoot)
$ cd overwatch/webApp/static && bower install && git clone https://github.com/root-project/jsroot.git jsRoot && cd -
# Install for local development.
$ pip install -e .

Docker Image

A docker image is available on Docker Hub under the name rehlers/overwatch. Be certain to mount a directory containing data into the image so it can be used! Note that you will likely want to use this image interactively (-it) and may want to remove the container when you are done (--rm). If the data is in a folder called data, it should look something like:

$ docker run -it --rm -v data:/overwatch/data rehlers/overwatch /bin/bash

Using Overwatch

Retrieving test data

To use most parts of the Overwatch project, you need some data provided by the HLT. The latest five runs of data received by Overwatch can be accessed here. The login credentials are available on the ALICE TWiki.

Process the data with overwatchProcessing

Create a basic configuration file named config.yaml containing something like:

# Main options
# Enable debug settings, messages at the debug level
debug: true
loggingLevel: "DEBUG"
# Reprocess the data each time, even if it is not detected as needed. It can be useful
# to test modifications to the processing
forceReprocessing: true

# The directory defaults to "data", which is the recommended name
dataFolder: &dataFolder "path/to/data"

Then, start processing the data with:

$ overwatchProcessing

Visualizing the data with overwatchWebApp

For the webApp, add something similar to the following to your config.yaml:

# Define users for local usage
_users: !bcrypt
    bcryptLogRounds: *bcryptLogRounds
    # You can change these values as desired
    # The key, (below is "username") is the the name of your user, while the value, (below is "password") is your password
    username: "password"
# Continue to keep debug: true . It often helps with ZODB difficulties.

Then, to start the webApp for data visualization, run:

$ overwatchWebApp

By default, the webApp will be available at http://127.0.0.1:8850 using the flask development server (not for production). Login with the credentials that were specified in your configuration file.

Table of Contents

  1. Overwatch Overview and Architecture
  2. Overwatch Configuration
  3. Overwatch Deployment

Overwatch Architecture

The Overwatch architecture is as shown above. Incoming data is handled by the receivers, which then make that data available to be processed by the processing module. The output of the processing is then visualized via the WebApp. In terms of code, the dependencies are as follows:

python modules
---
base <- processing <- webApp
     <- dqmReceiver

c++
---
zmqReceiver

Further information on each component is available in the sections below.

Overwatch Processing

The main processing component of Overwatch is responsible for transforming the received data into a viewable form, while also extracting derived quantities and performing checks for alarms. The main processing module is written in python and depends heavily on PyRoot, with some functionality implemented through numpy. The module is located in overwatch/processing, with the file processRuns.py driving the processing.

At a high level, the processing pipeline looks like:

  • Extract run metadata (run number, HLT mode, detector subsystem being processed, available histograms in the particular run, etc).
  • Determine which runs need processing.
    • For example, if a new file has arrived for a particular run, then that run should be processed.
  • If the run is new, determine which objects (histograms) are included and to which groups they belong, which processing functions need to be run, etc.
    • The processing functions are implemented by each detector and called when requested by the particular detector.
  • Apply those processing functions for each object (histogram), and store the outputs.

Each detector (also known as a subsystem) is given the opportunity to plug into the processing pipeline at nearly every stage. Each one is identified by the three letter detector name. The detector specific code is located in overwatch/processing/detectors/ and can be enable through the processing configuration.

Overwatch WebApp

An Overwatch run page

The web app visualizes the information provided by the processing. The WebApp is based on flask and serves the various forms of visualization, as well as providing an interface to request on-demand processing of the data with customized parameters. Note that this causes a direct dependence on the processing module. The main mode of visualization is via json files displayed using JSRoot, which provides interactivity with the data.

Overwatch Data Receivers

The receivers are responsible for receiving data from the various input sources and writing them out. Receivers write out ROOT files with the same filename information, thereby allowing for them to be processed the same regardless of their source.

Note that these receivers need to be deployed in the production environment, but would rarely, if ever, need to be used by standard Overwatch users!

HLT Receivers

Data from the HLT consists of ROOT TObject-derived objects sent via ZeroMQ (ZMQ). The receiver is built in C++, with dependencies on HLT files automatically downloaded, compiled, and linked with the receiver code when the receiver is compiled.

Installation follows the typical CMake pattern for an out of source build. When configuring, remember to specifying the location of ZMQ and ROOT as necessary. Once built, the receiver executable is named zmqReceive. A variety of options are available - for the precise options, see the help (-h or --help).

Note that if there is a ROOT version mismatch (for example, ROOT 5 on the HLT but ROOT 6 for Overwatch), it is imperative to request the relevant ROOT streamers with the '--requestStreamers' option. Note that this option can potentially trigger an internal ROOT bug, and therefore should not be used too frequently. Thus, the request is only sent once when the receiver is started, and it should not be frequently restarted.

DQM Receiver

Data from DQM consists of ROOT files sent via a rest API. The DQM receiver code is written as a flask app. The web app is installed as part of the Overwatch package and can be run using the flask development server via overwatchDQMReceiver. It is configured using the same system as the rest of the Overwatch package, as described here.

For the APIs that are made available, please see the main server code in overwatch/receiver/dqmReceiver.py.

Overwatch Configuration

Overwatch is configured via options defined in YAML configuration files. There is one configuration file each for the Overwatch module (DQM receiver, processing, and webApp). Given the dependency of the various module on each other, the configuration files are also interconnected. For example, if the webApp is loaded, it will also load the processing configuration, along with the other configurations on which the processing depends. In particular, below is the ordered precedence for configuration files.

./config.yaml
~/overwatch{Module}.yaml
overwatch/webApp/config.yaml
overwatch/processing/config.yaml
overwatch/receiver/config.yaml
overwatch/base/config.yaml

For a list of the available configuration options, see the config.yaml file in the desired module.

Overwatch Deployment

All of the components of Overwatch can be configured and launched by the overwatchDeploy executable. Overwatch is intended to be deployed with a docker image. Within this image, configurations are managed by supervisord. All web apps are deployed behind nginx.

The Dockerfiles and additional information is available in the deploy/docker directory.

Configuring Deployment

For a configuration file containing all available options, see overwatch/base/deployConfig.yaml. Note that this particular file is not considered when configuring a deployment - it only considers the file that is passed to it.

Deployment with the docker image

The role of the image is determined by the configuration passed into the environment variable config. Available configuration options are described in the section on configuring Overwatch for deployment.

The image can then be run with something like (using an external configuration file call config.yaml):

$ docker run -d -v data:/overwatch/data -e config="$(config.yaml)" rehlers/overwatch

Name Meaning

OVERWATCH: Online Visualization of Emerging tRends and Web Accessible deTector Conditions using the HLT.

About

OVERWATCH provides real time detector monitoring and QA for ALICE

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 69.2%
  • HTML 9.5%
  • JavaScript 7.0%
  • Shell 4.7%
  • C++ 4.0%
  • CSS 3.8%
  • CMake 1.8%