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.
To build fty-metric-compute project run:
mkdir build && cd build cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=usr -DBUILD_TESTING=On .. make make check # to run self-test sudo make install
## How to run
To run fty-metric-compute project:
* from within the source tree, run:
```bash
./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 - 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
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.
Agent doesn't publish any metrics.
Agent doesn't publish any alerts.
Agent doesn't receive any mailbox requests.
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)
Agent is SUBscribed on ASSETS stream. Once it receives any "delete" or "retire" ASSET
message it will drop all computations for that asset.