Skip to content
svalder edited this page Aug 4, 2021 · 6 revisions

Welcome to the opmonlib wiki!

This area provides the general documentation for the operational monitoring library. This is not yet complete, but is to be adapted and maintained in line with the repository.

Overview

A general overview of the repository in it's current state can be found here

User Documentation

Building

  1. Firstly prepare your work area as per the instructions given here.
  2. Navigate to the sourcecode directory within your work area and clone the latest version of the operational monitoring library using the follwing commands: git clone [email protected]:DUNE-DAQ/opmonlib.git -b develop (if using a password-protected SSH key) git clone [email protected]:DUNE-DAQ/opmonlib.git -b develop (if using SVN and the web URL)
  3. Optional: If you are wanting to publish monitoring information to influxDB then clone the latest version of influxopmon - the influxDB plugin for operational monitoring: git clone [email protected]:DUNE-DAQ/influxopmon.git -b develop (if using a password-protected SSH key) git clone [email protected]:DUNE-DAQ/influxopmon.git -b develop (if using SVN and the web URL)
  4. Run the command dbt-workarea-env to set up your work environment
  5. To build the package(s), run the command, dbt-build.sh

Notes:

In DUNE DAQ build order, influxopmon should be built after opmonlib

Running

The operational monitoring library (opmonlib) has two in-built plugins provided which can print monitoring information via two basic output methods: print to terminal through std::out, or print to a file.

The behavior of the output is controlled via the URI that is passed to the InfoManager constructor. For the two plug-ins provided, the following URI can be used:

  • Print to terminal:
    • stdout://flat - outputs one line for each variable
    • stdout://formatted - outputs formatted json objects
    • stdout://compact - outputs a json object in one line
  • Print to file:
    • file:///file/path/file_name.out - outputs a json object to file

Influxopmon plugin

There is an additional output method available using the Influx DB plugin for operational monitoring influxopmon to publish the information to a time-series database. Influxopmon converts a JSON object into an influxdb insert statement, then inserts the statement into an influx database. To access influxopmon, clone the plugin as shown in "step 3." in "Building".

The URI for publishing to the test influx DB is at present (August 2021): influx://188.185.88.195:80/write?db=db1

Translating that in full, the following is an example of a full daq application command publishing information through influxopmon:

  daq_application -c rest://localhost:12345 --name yourchosenname -i influx://188.185.88.195:80/write?db=db1

Full documentation for influxopmon can be found here.

Visualizing the information in Grafana

Grafana is an open source tool for analystics and monitoring of information from databases. Grafana provides a method of monitoring in real-time and has an easy interface with time-series databases such as influx DB.

An instance of Grafana is available on the NP04 serves and can be accessed on all CERN computers at http://np04-srv-009.cern.ch:3000/. On this instance, the test influx database https://dbod-testinfluxyd.cern.ch:8095 has been configured as a data source (called InfluxTest) meaning all information uploaded to this influx DB is available to view on the NP04 instance of Grafana.

Note: If you are not at CERN you can use remote desktops to access the np-04 instance of Grafana. More information is available here.

Tutorials on using Grafana are available here, and