Skip to main content

POST – Change Metric Report Definitions

Behavior

  1. The following properties are mandatory to change a metric report definition.

    • ID

    • Name

    • Schedule.RecurrenceInterval

    • MetricReport

    • MetricReportDefinitionType

    • MetricProperties or Metrics

  2. If the value of the ServiceEnabled attribute available under the Telemetry Service Resource (i.e./redfish/v1/TelemetryService) is true, it signifies that the Telemetry Service is in Enabled state and the POST Request will succeed.

  3. If it is false, it signifies that the Telemetry Service is in Disabled state and it will fail with an error message stating, the operation failed because this service is disabled can no longer take incoming requests.

  4. Status->State and Status->Health are read-only attributes and cannot be passed in the POST Request Body.

  5. Only a maximum of 25 MetricReportDefinitions can be created.

  6. MaxReports Limit is 25.

    1. Maximum Number of MetricrReportDefinitions that can be created by issuing POST Request is 25(considered internally)

    2. Maximum number of Metric Reports that is generated internally is also 25.

  7. Consider the following scenario:

    1. Suppose a MetricReportDefinition is created with "SuppressRepeatedMetric" = false and "ReportUpdates" = "NewReport" and 'RecurrenceInterval' = 'PT20S'.

    2. In this case, new Metric Report shall be generated every 20 seconds.

    3. After a certain duration, the count of Metric Reports will definitely reach the MaxReports Limit (i.e. 25).

    4. Once the count of Metric Reports reaches the MaxReports Limit, no further Metric Reports will be generated until the user deletes any or all of the existing Metric Reports.

    5. Also, a Log Entry will be added under Telemetry Log Service indicating that Count of MetricReports has reached the MaxReports Limit and that no further Metric Reports will be generated until the user deletes any or all of the existing Metric Reports.

  8. When a request is issued to create a MetricReportDefinition, the following conditions come into the picture:

    1. MetricReportDefinition gets created if neither the count of MetricReports nor the count of MetricReportDefinitions has reached the MaxReports Limit.

    2. Throw "CreateLimitReachedForResource" error if the count of MetricReportDefinitions has reached the MaxReports Limit.

    3. Throw "CreateLimitReachedForMetricReportsResource" error if the count of MetricReports has reached the MaxReports Limit.

  9. Consider the following cases of creation of MetricReportDefinitions:

    • Assume MetricReportDefinitions Count has reached the MaxReports Limit irrespective of whether Count of MetricReports has reached the MaxReports Limit or not.

      1. Create any MRD is not allowed.

        • Condition1: with ReportActions = ["RedfishEvent", "LogToMetricReportsCollection"]

        • Condition2: with ReportActions = ["RedfishEvent"]

        • Condition3: with ReportActions = ["LogToMetricReportsCollection"]

    • Assume MetricReportDefinitions count has not reached the MaxReports Limit but Count of MetricReports has reached the MaxReports Limit.

      1. Create MRD with ReportActions = ["RedfishEvent", "LogToMetricReportsCollection"] is not allowed.

      2. Create MRD with ReportActions = ["LogToMetricReportsCollection"] is not allowed.

      3. Create MRD with ReportActions = ["RedfishEvent"] is allowed.

Request

POST https://{{ip}}/redfish/v1/TelemetryService/MetricReportDefinitions
Content-Type: application/json

Request body

Request Body Temperature Report:

{
"Id": "TemperatureReport",
"Name": "Temperature_Report",
"Schedule": {
"RecurrenceInterval": "PT20S"
},
"MetricReportDefinitionType": "Periodic",
"MetricReport": {
"@odata.id": "/redfish/v1/TelemetryService/MetricReports/TemperatureReport"
},
"MetricProperties": [
"/redfish/v1/Chassis/Self/Thermal#/Temperatures/116_0/ReadingCelsius",
"/redfish/v1/Chassis/Self/Thermal#/Temperatures/117_0/ReadingCelsius"
]
}

Request Body Average Temperature Report:

{
"Id": "AverageTemperatureReport",
"Name": "Average_Temperature_Report",
"Schedule": {
"RecurrenceInterval": "PT40S"
},
"MetricReportDefinitionType": "Periodic",
"MetricReport": {
"@odata.id": "/redfish/v1/TelemetryService/MetricReports/AverageTemperatureReport"
},
"Metrics": [
{
"MetricId": "AverageTemperature",
"CollectionTimeScope": "Interval",
"MetricProperties": [
"/redfish/v1/Chassis/Self/Thermal#/Temperatures/117_0/ReadingCelsius",
"/redfish/v1/Chassis/Self/Thermal#/Temperatures/116_0/ReadingCelsius"
],
"CollectionDuration": "PT40S",
"CollectionFunction": "Average"
}
]
}

Request body with MetricReportHeartbeatInterval, SuppressRepeatedMetricValue and MetricReportDefinitionEnabled:

{
"Id": "AverageTemperatureReport",
"Name": "Average_Temperature_Report",
"Schedule": {
"RecurrenceInterval": "PT20S"
},
"MetricReportDefinitionType": "Periodic",
"SuppressRepeatedMetricValue": true,
"MetricReportDefinitionEnabled": true,
"MetricReportHeartbeatInterval": "PT30S",
"MetricReport": {
"@odata.id": "/redfish/v1/TelemetryService/MetricReports/AverageTemperatureReport"
},
"Metrics": [
{
"MetricId": "AverageTemperature",
"CollectionTimeScope": "Interval",
"MetricProperties": [
"/redfish/v1/Chassis/Self/Thermal#/Temperatures/117_0/ReadingCelsius",
"/redfish/v1/Chassis/Self/Thermal#/Temperatures/116_0/ReadingCelsius"
],
"CollectionDuration": "PT20S",
"CollectionFunction": "Average"
}
]
}

Request example

{
"Id": "TemperatureReport",
"Name": "Temperature_Report",
"Schedule": {
"RecurrenceInterval": "PT20S"
},
"MetricReportDefinitionType": "Periodic",
"MetricReport": {
"@odata.id": "/redfish/v1/TelemetryService/MetricReports/TemperatureReport"
},
"MetricProperties": [
"/redfish/v1/Chassis/Self/Thermal#/Temperatures/116_0/ReadingCelsius",
"/redfish/v1/Chassis/Self/Thermal#/Temperatures/117_0/ReadingCelsius"
]
}

Response body

The response status is 201 and the response body is a GET Response with the properties of the newly created Session.

Response example

When the request is successful, a message body similar to the following is returned:

HTTP/1.1 201 Created
Location:https: //<ip>/redfish/v1/ TelemetryService/MetricReportDefinitions/TemperatureReport{
"@odata.context": "/redfish/v1/$metadata#MetricReportDefinition.MetricReportDefinition(ReportUpdates,
MetricReportDefinitionEnabled,Id,Status,Name,MetricProperties,ReportActions,MetricReportDefinitionType,MetricReport,Schedule)",
"@odata.etag": "\"1581503147\"",
"@odata.id": "/redfish/v1/TelemetryService/MetricReportDefinitions/TemperatureReport",
"@odata.type": "#MetricReportDefinition.v1_2_0.MetricReportDefinition",
"Id": "TemperatureReport",
"MetricProperties": [
"/redfish/v1/Chassis/Self/Thermal#/Temperatures/117_0/ReadingCelsius",
"/redfish/v1/Chassis/Self/Thermal#/Temperatures/116_0/ReadingCelsius"
],
"MetricReport": {
"@odata.id": "/redfish/v1/TelemetryService/MetricReports/TemperatureReport"
},
"MetricReportDefinitionEnabled": true,
"MetricReportDefinitionType": "Periodic",
"Name": "Temperature_Report",
"ReportActions": [
"LogToMetricReportsCollection"
],
"ReportUpdates": "Overwrite",
"Schedule": {
"RecurrenceInterval": "PT20S"
},
"Status": {
"Health": "OK",
"State": "Enabled"
}
}

Response for Average Temperature Report:

HTTP/1.1 201 Created
Location:
https://<ip>/redfish/v1/TelemetryService/MetricReportDefinitions/AverageTemperatureReport{
"@odata.context": "/redfish/v1/$metadata#MetricReportDefinition.MetricReportDefinition(ReportUpdates,
MetricReportDefinitionEnabled,Id,Status,Name,ReportActions,MetricReportDefinitionType,MetricReport,Schedule,Metrics)",
"@odata.etag": "\"1581503501\"",
"@odata.id": "/redfish/v1/TelemetryService/MetricReportDefinitions/AverageTemperatureReport",
"@odata.type": "#MetricReportDefinition.v1_2_0.MetricReportDefinition",
"Id": "AverageTemperatureReport",
"MetricReport": {
"@odata.id": "/redfish/v1/TelemetryService/MetricReports/AverageTemperatureReport"
},
"MetricReportDefinitionEnabled": true,
"MetricReportDefinitionType": "Periodic",
"Metrics": [
{
"CollectionDuration": "PT40S",
"CollectionFunction": "Average",
"CollectionTimeScope": "Interval",
"MetricId": "AverageTemperature",
"MetricProperties": [
"/redfish/v1/Chassis/Self/Thermal#/Temperatures/116_0/ReadingCelsius",
"/redfish/v1/Chassis/Self/Thermal#/Temperatures/117_0/ReadingCelsius"
]
}
],
"Name": "Average_Temperature_Report",
"ReportActions": [
"LogToMetricReportsCollection"
],
"ReportUpdates": "Overwrite",
"Schedule": {
"RecurrenceInterval": "PT40S"
},
"Status": {
"Health": "OK",
"State": "Enabled"
}
}

Response for MetricReportHeartbeatInterval, SuppressRepeatedMetricValue and MetricReportDefinitionEnabled:

{
"@odata.context": "/redfish/v1/$metadata#MetricReportDefinition.MetricReportDefinition(ReportUpdates,
MetricReportDefinitionEnabled,Id,Status,Name,SuppressRepeatedMetricValue,MetricReportDefinitionType,MetricReport,
Metrics,MetricReportHeartbeatInterval,Schedule,ReportActions)",
"@odata.etag": "\"1583757340\"",
"@odata.id": "/redfish/v1/TelemetryService/MetricReportDefinitions/AverageTemperatureReport",
"@odata.type": "#MetricReportDefinition.v1_2_0.MetricReportDefinition",
"Id": "AverageTemperatureReport",
"MetricReport": {
"@odata.id": "/redfish/v1/TelemetryService/MetricReports/AverageTemperatureReport"
},
"MetricReportDefinitionEnabled": true,
"MetricReportDefinitionType": "Periodic",
"MetricReportHeartbeatInterval": "PT30S",
"Metrics": [
{
"CollectionDuration": "PT20S",
"CollectionFunction": "Average",
"CollectionTimeScope": "Interval",
"MetricId": "AverageTemperature",
"MetricProperties": [
"/redfish/v1/Chassis/Self/Thermal#/Temperatures/116_0/ReadingCelsius",
"/redfish/v1/Chassis/Self/Thermal#/Temperatures/117_0/ReadingCelsius"
]
}
],
"Name": "Average_Temperature_Report",
"ReportActions": [
"LogToMetricReportsCollection"
],
"ReportUpdates": "Overwrite",
"Schedule": {
"RecurrenceInterval": "PT20S"
},
"Status": {
"Health": "OK",
"State": "Enabled"
},
"SuppressRepeatedMetricValue": true
}