Giter Site home page Giter Site logo

aquette / fty-metric-compute Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 42ity/fty-metric-compute

0.0 2.0 0.0 306 KB

Compute averages, min/max on metrics

License: GNU General Public License v2.0

Makefile 2.54% Shell 17.69% M4 30.59% C 9.08% C++ 40.10%

fty-metric-compute's Introduction

fty-metric-compute

Agent fty-metric-compute is SUBscribed on METRICS stream and computes
averages/min/max for defined time steps and PUBlish them back on a METRICS
stream.

How to build

To build fty-metric-compute project run:

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

How to run

To run fty-metric-compute project:

  • from within the source tree, run:
./src/fty-metric-compute

For the other options available, refer to the manual page of fty-metric-compute

  • from an installed base, using systemd, run:
systemctl start fty-metric-compute

Configuration file

Configuration file - fty-metric-compute.cfg - is currently ignored.

Agent reads environment variable BIOS_LOG_LEVEL to set verbosity level.

Agent persists its state in the /var/lib/fty/fty-metric-compute/state.zpl

Architecture

Overview

fty-metric-compute has 1 actor:

  • fty-mc-server: main actor

It also has one built-in timer, which runs at the next configured 'step',
publishes computed metrics and saves the state.

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 requests.

Stream subscriptions

METRICS stream

Agent is SUBscribed on METRICS stream (for now only for "realpower.default,
"average.temperature", "average.humidity" topics) . Once the time step passed, it PUBlishes a
computed value back as METRIC on the METRICS stream with the following properties:

  • subject is ${original-subject}_${type}_${step}@${asset_name}
  • there is x-cm-type field in aux stating the type
  • there is x-cm-step field in aux stating the step in [s]
  • there is x-cm-sum field in aux internal information
  • there is x-cm-count field in aux how many measurements where processed in that interval
  • there is time field in aux stating the start of computation (UNIXTIME in UTC)

ASSETS stream

Agent is SUBscribed on ASSETS stream. Once it receives any "delete" or "retire" ASSET
message it will drop all computations for that asset.

fty-metric-compute's People

Contributors

malanka avatar jimklimov avatar barraudl avatar jana-rapava avatar vyskocilm avatar geraldguillaume avatar cdominguezm avatar bkrauzova avatar aquette avatar jean-baptisteboric-eaton avatar karolhrdina avatar arnaudquette-eaton avatar eldoreijk avatar michal42 avatar kkathreen avatar

Watchers

James Cloos avatar  avatar

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.