/c2mon-daq-hostmetrics

DAQ module for acquiring simple host metrics via OSHI (https://github.com/oshi/oshi)

Primary LanguageJavaGNU Lesser General Public License v3.0LGPL-3.0

c2mon-daq-hostmetrics

build status

A simple, exemplary C2MON DAQ module for publishing metrics about the current host using the OSHI library.

Documentation

See the current reference docs.

Issue tracking

Please report issues on GitLab via the issue tracker.

Release notes

Please have a look into the CHANGELOG.md file.

Milestone planning

Find here the complete list of all existing version milestones.

Building from Source

C2MON uses a Maven-based build system.

Prerequisites

Git and JDK 11 or later

Be sure that your JAVA_HOME environment variable points to the jdk-11 folder extracted from the JDK download.

Check out sources

git clone git@github.com:c2mon/c2mon-daq-hostmetrics.git

Compile and test; build jar and distribution tarball

mvn package -DskipDockerBuild -DskipDockerTag --settings ./settings.xml

Startup

Make sure that your C2MON server is running before launching the Hostmetrics DAQ. In the example commands below we assume that C2MON is running on localhost.

Running from IDE

To start the Hostmetrics DAQ from your preferred IDE, specify as main class cern.c2mon.daq.DaqStartup and add the following VM argument: -Dc2mon.daq.name=P_HOST01

Running from tarball (Linux/Unix)

First you need to download the latest stable distribution tarball.

The c2mon-daq-hostmetrics tarball release can be downloaded from CERN Nexus Repository

Please check here for the latest stable releaes version.

Installing

  • Download the latest stable distribution tarball

  • Note, that the tarball does not include a root folder, so you have to create this yourself before extracting it:

    mkdir c2mon-daq-hostmetrics; tar -xzf c2mon-daq-hostmetrics-1.0.x-dist.tar.gz -C c2mon-daq-hostmetrics
  • Once you have installed your distribution tarball run the following command:

    ${DAQ_HOME}/bin/daqprocess.sh start P_HOST01

Running from Docker image

docker run --rm --name daq-hostmetrics -it --net=host -e "C2MON_PORT_61616_TCP=tcp://localhost:61616" \
  gitlab-registry.cern.ch/c2mon/c2mon-daq-hostmetrics bin/C2MON-DAQ-STARTUP.jvm -f P_HOST01

License

C2MON is released under the GNU LGPLv3 License.