Is this the right place to submit this?
Bug Description
Hi,
The current telemetry implementation is not compliant with the redfish standard.
When creating a MetricReportDefinition, BMCWeb expects any MetricProperty to link to a Sensor resource. When POSTed to the TelemetryService, the following json works:
{
"Id": "SampleMetric",
"Metrics": [
{
"MetricProperties": [
"/redfish/v1/Chassis/power_board/Sensors/power_C3PB7_HSW_PIN"
]
}
],
"MetricReportDefinitionType": "Periodic",
"ReportActions": [
"RedfishEvent",
"LogToMetricReportsCollection"
],
"Schedule": {
"RecurrenceInterval": "PT5S"
}
}
DSP0268 explains that a MetricProperty must point to a resource property (e.g. the Reading property of a Sensor):


This allows for Metric Reports to be defined for any property, not only the Reading of Sensors. E.g., the example of MetricReportDefinition in DSP0268 points to the PowerConsumedWatts property of the Thermal schema:

A properly Redfish-compliant MetricReportDefinition request on the previous sensor should thus be:
{
"Id": "SampleMetric",
"Metrics": [
{
"MetricProperties": [
"/redfish/v1/Chassis/power_board/Sensors/power_C3PB7_HSW_PIN/Reading"
]
}
],
"MetricReportDefinitionType": "Periodic",
"ReportActions": [
"RedfishEvent",
"LogToMetricReportsCollection"
],
"Schedule": {
"RecurrenceInterval": "PT5S"
}
}
Which fails against bmcweb on OpenBMC 2.14 with the following reply:
{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The property '/redfish/v1/Chassis/power_board/Sensors/power_C3PB7_HSW_PIN/Reading' with the requested value of 'MetricProperties/0' could not be written because the value does not meet the constraints of the implementation.",
"MessageArgs": [
"/redfish/v1/Chassis/power_board/Sensors/power_C3PB7_HSW_PIN/Reading",
"MetricProperties/0"
],
"MessageId": "Base.1.16.0.PropertyValueIncorrect",
"MessageSeverity": "Warning",
"Resolution": "No resolution is required."
}
],
"code": "Base.1.16.0.PropertyValueIncorrect",
"message": "The property '/redfish/v1/Chassis/power_board/Sensors/power_C3PB7_HSW_PIN/Reading' with the requested value of 'MetricProperties/0' could not be written because the value does not meet the constraints of the implementation."
}
Version
Internal Eviden fork of OpenBMC based on OpenBMC 2.14.
Offending code is from upstream:
https://github.com/openbmc/bmcweb/blob/4d7b5ddb3a2b6cc42b7bbc0c710f297e6df4fd55/redfish-core/lib/metric_report_definition.hpp#L666
Additional Information
No response
Is this the right place to submit this?
Bug Description
Hi,
The current telemetry implementation is not compliant with the redfish standard.
When creating a MetricReportDefinition, BMCWeb expects any MetricProperty to link to a Sensor resource. When POSTed to the TelemetryService, the following json works:
{ "Id": "SampleMetric", "Metrics": [ { "MetricProperties": [ "/redfish/v1/Chassis/power_board/Sensors/power_C3PB7_HSW_PIN" ] } ], "MetricReportDefinitionType": "Periodic", "ReportActions": [ "RedfishEvent", "LogToMetricReportsCollection" ], "Schedule": { "RecurrenceInterval": "PT5S" } }DSP0268 explains that a MetricProperty must point to a resource property (e.g. the Reading property of a Sensor):
This allows for Metric Reports to be defined for any property, not only the Reading of Sensors. E.g., the example of MetricReportDefinition in DSP0268 points to the PowerConsumedWatts property of the Thermal schema:
A properly Redfish-compliant MetricReportDefinition request on the previous sensor should thus be:
{ "Id": "SampleMetric", "Metrics": [ { "MetricProperties": [ "/redfish/v1/Chassis/power_board/Sensors/power_C3PB7_HSW_PIN/Reading" ] } ], "MetricReportDefinitionType": "Periodic", "ReportActions": [ "RedfishEvent", "LogToMetricReportsCollection" ], "Schedule": { "RecurrenceInterval": "PT5S" } }Which fails against bmcweb on OpenBMC 2.14 with the following reply:
{ "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The property '/redfish/v1/Chassis/power_board/Sensors/power_C3PB7_HSW_PIN/Reading' with the requested value of 'MetricProperties/0' could not be written because the value does not meet the constraints of the implementation.", "MessageArgs": [ "/redfish/v1/Chassis/power_board/Sensors/power_C3PB7_HSW_PIN/Reading", "MetricProperties/0" ], "MessageId": "Base.1.16.0.PropertyValueIncorrect", "MessageSeverity": "Warning", "Resolution": "No resolution is required." } ], "code": "Base.1.16.0.PropertyValueIncorrect", "message": "The property '/redfish/v1/Chassis/power_board/Sensors/power_C3PB7_HSW_PIN/Reading' with the requested value of 'MetricProperties/0' could not be written because the value does not meet the constraints of the implementation." }Version
Additional Information
No response