Agent fty-metric-tpower computes power metrics for racks and DCs.
How to build
To build fty-metric-tpower project run:
./autogen.sh ./configure make make check # to run self-test
How to run
To run fty-metric-tpower project:
- from within the source tree, run:
For the other options available, refer to the manual page of fty-metric-store
- from an installed base, using systemd, run:
systemctl start fty-metric-tpower
Configuration file - fty-metric-tpower.cfg - is currently ignored.
Agent reads environment variable BIOS_LOG_LEVEL to set verbosity level.
fty-metric-tpower has 1 actor:
- fty-metric-tpower-server: main actor
It also has one built-in timer, which runs each minute, sends metrics for racks/DCS
which request it and reloads the topology if reconfig was pending.
Agent publishes power metrics for racks and DCs:
stream=METRICS sender=agent-tpower subject=realpower.default@rack-51 D: 18-01-19 13:30:18 FTY_PROTO_METRIC: D: 18-01-19 13:30:18 aux= D: 18-01-19 13:30:18 time=1516368615 D: 18-01-19 13:30:18 ttl=360 D: 18-01-19 13:30:18 type='realpower.default' D: 18-01-19 13:30:18 name='rack-51' D: 18-01-19 13:30:18 value='885.000000' D: 18-01-19 13:30:18 unit='W'
stream=METRICS sender=agent-tpower subject=realpower.output.L1@datacenter-3 D: 18-01-19 13:30:18 FTY_PROTO_METRIC: D: 18-01-19 13:30:18 aux= D: 18-01-19 13:30:18 time=1516368617 D: 18-01-19 13:30:18 ttl=360 D: 18-01-19 13:30:18 type='realpower.output.L1' D: 18-01-19 13:30:18 name='datacenter-3' D: 18-01-19 13:30:18 value='1700.000000' D: 18-01-19 13:30:18 unit='W'
Agent doesn't publish any alerts.
Agent doesn't receive any mailbox requests.
If the metric is not realpower metric, ignore it.
Otherwise, check whether the metric is relevant for any known rack/DC,
recompute its power metrics and publish them if asked to do so.
On any ASSET message, postpone the reconfig if we are currently in the middle of one
and set the timer to the next metric publish request.