Lua based engine to generate composite metric
C++ M4 Shell C Makefile
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
builds Problem: We need to integrate fty-common-logging. Jul 17, 2018
doc Regenerated zproject with current latest templates, applying recent r… Jun 4, 2018
include Problem: We need to replace logger class with fty-common-logging. Jul 17, 2018
packaging
src Problem: Subprocess should be moved to fty-common. Jul 17, 2018
.clang-format Regenerated zproject with current latest templates, applying recent r… Jun 4, 2018
.editorconfig
.gitattributes
.gitignore
.travis.fixlua Problem: fty-metric-composite cannot be build Jan 9, 2017
.travis.yml Problem: We need to integrate fty-common-logging. Jul 17, 2018
COPYING
Jenkinsfile
Makefile.am
README.md
autogen.sh Regenerate with recent zproject Mar 19, 2017
ci_build.sh Problem: We need to integrate fty-common-logging. Jul 17, 2018
ci_deploy.sh
ci_deploy_obs.sh Regenerate with current zproject; update reference to fty_proto, czmq… Jun 9, 2017
configure.ac
install.xml
license.xml license.xml : Promote to (C) 2018 Jun 3, 2018
project.xml Problem: Subprocess should be moved to fty-common. Jul 17, 2018

README.md

fty-metric-composite

Agent fty-metric-composite receives sensor metrics and feeds them into LUA functions, which compute standard metrics.

It has a helper component fty-metric-composite-configurator which configures it based on received asset messages.

How to build

To build fty-metric-composite project run:

./autogen.sh
./configure
make
make check # to run self-test

How to run

To run fty-metric-composite project:

  • from within the source tree, run:
./src/fty-metric-composite-configurator
./src/fty-metric-composite /var/lib/fty/fty-metric-composite/bios.cfg

For the other options available, refer to the manual pages of fty-metric-composite and fty-metric-composite-configurator.

  • from an installed base, using systemd, run:
systemctl start fty-metric-composite-configurator
systemctl start fty-metric-composite@bios

Component fty-metric-composite

Configuration file

Standard configuration file for fty-metric-composite - fty-metric-composite.cfg - is currently ignored.

Component fty-metric-composite receives a name of non-standard configuration file as its first command-line argument.

Based on this file (by default /var/lib/fty/fty-metric-composite/bios.cfg),
it sets an instance (by default bios) and types of metrics for which to listen on _METRICS_SENSOR stream.

Agent reads environment variable BIOS_LOG_LEVEL to set verbosity level.

Architecture

Overview

fty-metric-composite has 1 actor:

  • fty-metric-composite-server: main actor

Protocols

Published metrics

Agent publishes metrics on METRICS stream.

Published alerts

Agent doesn't publish any alerts.

Mailbox requests

Agent doesn't receive any mailbox requests.

Stream subscriptions

Agent is subscribed to _METRICS_SENSOR stream.

When it receives a metric, it updates the local cache and evaluates stored LUA function.
Computed value is then published as a new metric on METRICS stream.

Component fty-metric-composite-configurator

Configuration file

Standard configuration file for fty-metric-composite-configurator - fty-metric-composite-configurator.cfg - is currently ignored.

Agent has a state file, stored by default in /var/lib/fty/fty-metric-composite/configurator_state_file.

In /var/lib/fty/fty-metric-composite/ are stored .cfg files for various assets.

Agent reads environment variable BIOS_LOG_LEVEL to set verbosity level.

Architecture

Overview

fty-metric-composite-configurator has 1 actor and 1 zloop timer:

  • fty-metric-composite-configurator-server: main actor
  • check-configuration-trigger: runs ever minute;

It reads environment variable BIOS_DO_SENSOR_PROPAGATION and sends message
IS_PROPAGATION_NEEDED/{true,false} based on its value.

It also has one built-in timer, which re-generates LUA functions for known assets
and sends METRICS_UNAVAILABLE for devices for which no data are available.

Protocols

Published metrics

Agent doesn't publish any metrics.

Published alerts

Agent doesn't publish any alerts.

Mailbox requests

Agent doesn't receive any mailbox messages.

Stream subscriptions

Agent is subscribed to ASSETSS stream.

Received assets are stored into local cache.