Add support for AppendLimit and ReportUpdates

Added 2 new properties for Report interface: AppendLimit and
ReportUpdates. They were also added as arguments to the future version
of AddReport method of ReportManager.

ReportUpdates property defines the report update behavior:
- Overwrite: Each report update overrides previous "Readings" property.
  "AppendLimit" set by user is not respected - "Readings" property size
  is equal to count of all sensor across all metrics defined in report.
- AppendWrapsWhenFull: New readings are appended until limit specified
  by "AppendLimit" is reached. Then oldest readings are overwritten by
  new ones.
- AppendStopsWhenFull: New readings are appended until limit specified
  by "AppendLimit" is reached. Then updates are stopped.
- NewReport: not supported yet and will be implemented in the future.

Please note that if ReportingType is set to OnRequest, those 2 new
properties are ignored, and Readings property will contain one reading
per defined sensor, across all metrics. They are still stored, which
means that if ReportingType will be changed in the runtime, those
properties will be respected.

Tested:
- Both new properties can be accessed from dbus.
- Both properties are reflected in Readings property.
- Old AddReport method is working as before the change.
- UTs are passing.

Signed-off-by: Szymon Dompke <szymon.dompke@intel.com>
Change-Id: I8a18f7e68215f0f6e5c403b533d2c4ff479df69e
19 files changed
tree: 9a7dedf4e6e1152e7a769ddeb24156779e1f13b0
  1. redfish-tests/
  2. scripts/
  3. src/
  4. subprojects/
  5. tests/
  6. .clang-format
  7. .gitignore
  8. LICENSE
  9. MAINTAINERS
  10. meson.build
  11. meson_options.txt
  12. OWNERS
  13. README.md
  14. xyz.openbmc_project.Telemetry.service.in
README.md

Telemetry

This component implements middleware for sensors and metrics aggregation.

Capabilities

This application is implementation of Telemetry proposed in OpenBMC design docs [1].

It's responsible for:

  • on-demand creation of metric reports,
    • aggregated sets of sensor values available in system [2],
  • access to metric report in both pull and push model (triggers),
  • run-time monitoring of sensor[3] updates.

Use-cases

  • generic and centralized way to observe telemetry data inside system
  • back-end for Redfish TelemetryService[4]

How to build

There are two way to build telemetry service:

  • using bitbake in yocto environment
  • using meson as native build

To build it using bitbake follow the guide from OpenBMC docs[5]. To build it using meson follow the quick guide to install meson[6] and then run below commands

meson build
cd build
ninja

After successful build you should be able to run telemetry binary or start unit tests

./tests/telemetry-ut
./telemetry

In case if system is missing boost dependency, it is possible to build it locally and set BOOST_ROOT environment variable to location of built files for meson. After this change meson should be able to detect boost dependency. See [7] for more details.

Notes

More information can be found in OpenBMC docs repository [8].

References

  1. OpenBMC platform telemetry design
  2. Sensor support for OpenBMC
  3. dbus-sensors
  4. Redfish TelemetryService
  5. Yocto-development
  6. Meson-Quick-Guide
  7. Meson-Boost-dependency
  8. OpenBMC-docs-repository