1{
2    "$id": "http://redfish.dmtf.org/schemas/v1/MetricDefinition.v1_3_4.json",
3    "$ref": "#/definitions/MetricDefinition",
4    "$schema": "http://redfish.dmtf.org/schemas/v1/redfish-schema-v1.json",
5    "copyright": "Copyright 2014-2024 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright",
6    "definitions": {
7        "Actions": {
8            "additionalProperties": false,
9            "description": "The available actions for this resource.",
10            "longDescription": "This type shall contain the available actions for this resource.",
11            "patternProperties": {
12                "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_]*$": {
13                    "description": "This property shall specify a valid odata or Redfish property.",
14                    "type": [
15                        "array",
16                        "boolean",
17                        "integer",
18                        "number",
19                        "null",
20                        "object",
21                        "string"
22                    ]
23                }
24            },
25            "properties": {
26                "Oem": {
27                    "$ref": "#/definitions/OemActions",
28                    "description": "The available OEM-specific actions for this resource.",
29                    "longDescription": "This property shall contain the available OEM-specific actions for this resource."
30                }
31            },
32            "type": "object"
33        },
34        "Calculable": {
35            "description": "The types of calculations that can be applied to the metric reading.  Provides information to the client on the suitability of calculation using the metric reading.",
36            "enum": [
37                "NonCalculatable",
38                "Summable",
39                "NonSummable"
40            ],
41            "enumDescriptions": {
42                "NonCalculatable": "No calculations should be performed on the metric reading.",
43                "NonSummable": "The sum of the metric reading across multiple instances is not meaningful.",
44                "Summable": "The sum of the metric reading across multiple instances is meaningful."
45            },
46            "longDescription": "The type shall describe the types of calculations that can be applied to the metric reading.",
47            "type": "string"
48        },
49        "CalculationAlgorithmEnum": {
50            "enum": [
51                "Average",
52                "Maximum",
53                "Minimum",
54                "OEM"
55            ],
56            "enumDescriptions": {
57                "Average": "The metric is calculated as the average metric reading over a sliding time interval.",
58                "Maximum": "The metric is calculated as the maximum metric reading over during a time interval.",
59                "Minimum": "The metric is calculated as the minimum metric reading over a sliding time interval.",
60                "OEM": "The metric is calculated as specified by an OEM."
61            },
62            "enumLongDescriptions": {
63                "Average": "The metric shall be calculated as the average metric reading over a sliding time interval.  The time interval shall contain the `CalculationTimeInterval` property value.",
64                "Maximum": "The metric shall be calculated as the maximum metric reading over a sliding time interval.  The time interval shall contain the `CalculationTimeInterval` property value.",
65                "Minimum": "The metric shall be calculated as the minimum metric reading over a sliding time interval.  The time interval shall contain the `CalculationTimeInterval` property value.",
66                "OEM": "The metric shall be calculated as specified by an OEM.  The `OEMCalculationAlgorithm` property shall contain the specific OEM calculation algorithm."
67            },
68            "enumVersionAdded": {
69                "OEM": "v1_1_0"
70            },
71            "type": "string"
72        },
73        "CalculationParamsType": {
74            "additionalProperties": false,
75            "description": "The parameters for a metric calculation.",
76            "longDescription": "This type shall contain the parameters for a metric calculation.",
77            "patternProperties": {
78                "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_]*$": {
79                    "description": "This property shall specify a valid odata or Redfish property.",
80                    "type": [
81                        "array",
82                        "boolean",
83                        "integer",
84                        "number",
85                        "null",
86                        "object",
87                        "string"
88                    ]
89                }
90            },
91            "properties": {
92                "ResultMetric": {
93                    "description": "The URI with wildcards and property identifiers of the metric property that stores the result of the calculation.  If the URI has wildcards, the wildcards are substituted as specified in the `Wildcards` property.",
94                    "longDescription": "This property shall contain a URI with wildcards and property identifiers of the metric property that stores the result of the calculation.  A set of curly braces shall delimit each wildcard in the URI.  The corresponding entry in the `Wildcard` property shall replace each wildcard.  After each wildcard is replaced, it shall identify a resource property to which the metric definition applies.  The property identifiers portion of the URI shall follow RFC6901-defined JSON pointer notation rules.",
95                    "readonly": true,
96                    "type": [
97                        "string",
98                        "null"
99                    ]
100                },
101                "SourceMetric": {
102                    "description": "The URI with wildcards and property identifiers of the metric property used as the input into the calculation.  If the URI has wildcards, the wildcards are substituted as specified in the `Wildcards` property.",
103                    "longDescription": "This property shall contain a URI with wildcards and property identifiers of the metric property used as the input into the calculation.  A set of curly braces shall delimit each wildcard in the URI.  The corresponding entry in the `Wildcard` property shall replace each wildcard.  After each wildcard is replaced, it shall identify a resource property to which the metric definition applies.  The property identifiers portion of the URI shall follow RFC6901-defined JSON pointer notation rules.",
104                    "readonly": true,
105                    "type": [
106                        "string",
107                        "null"
108                    ]
109                }
110            },
111            "type": "object"
112        },
113        "ImplementationType": {
114            "enum": [
115                "PhysicalSensor",
116                "Calculated",
117                "Synthesized",
118                "DigitalMeter"
119            ],
120            "enumDescriptions": {
121                "Calculated": "The metric is implemented by applying a calculation on another metric property.  The calculation is specified in the `CalculationAlgorithm` property.",
122                "DigitalMeter": "The metric is implemented as digital meter.",
123                "PhysicalSensor": "The metric is implemented as a physical sensor.",
124                "Synthesized": "The metric is implemented by applying a calculation on one or more metric properties.  The calculation is not provided."
125            },
126            "type": "string"
127        },
128        "MetricDataType": {
129            "description": "The data type of the related metric values.  Provides information to the client on the nature of the metric reading.",
130            "enum": [
131                "Boolean",
132                "DateTime",
133                "Decimal",
134                "Integer",
135                "String",
136                "Enumeration"
137            ],
138            "enumDescriptions": {
139                "Boolean": "The JSON boolean definition.",
140                "DateTime": "The JSON string definition with the date-time format.",
141                "Decimal": "The JSON decimal definition.",
142                "Enumeration": "The JSON string definition with a set of defined enumerations.",
143                "Integer": "The JSON integer definition.",
144                "String": "The JSON string definition."
145            },
146            "longDescription": "This type shall describe the data type of the related metric values as defined by JSON data types.",
147            "type": "string"
148        },
149        "MetricDefinition": {
150            "additionalProperties": false,
151            "description": "The `MetricDefinition` schema describes the metadata information for a metric.",
152            "longDescription": "This resource shall contain the metadata information for a metric in a Redfish implementation.",
153            "patternProperties": {
154                "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_]*$": {
155                    "description": "This property shall specify a valid odata or Redfish property.",
156                    "type": [
157                        "array",
158                        "boolean",
159                        "integer",
160                        "number",
161                        "null",
162                        "object",
163                        "string"
164                    ]
165                }
166            },
167            "properties": {
168                "@odata.context": {
169                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/context"
170                },
171                "@odata.etag": {
172                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/etag"
173                },
174                "@odata.id": {
175                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/id"
176                },
177                "@odata.type": {
178                    "$ref": "http://redfish.dmtf.org/schemas/v1/odata-v4.json#/definitions/type"
179                },
180                "Accuracy": {
181                    "description": "The estimated percent error of measured versus actual values.",
182                    "longDescription": "This property shall contain the percent error +/- of the measured versus actual values.  The property is not meaningful when the `MetricType` property is `Discrete`.",
183                    "readonly": true,
184                    "type": [
185                        "number",
186                        "null"
187                    ]
188                },
189                "Actions": {
190                    "$ref": "#/definitions/Actions",
191                    "description": "The available actions for this resource.",
192                    "longDescription": "This property shall contain the available actions for this resource."
193                },
194                "Calculable": {
195                    "anyOf": [
196                        {
197                            "$ref": "#/definitions/Calculable"
198                        },
199                        {
200                            "type": "null"
201                        }
202                    ],
203                    "description": "An indication of whether the metric can be used in a calculation.",
204                    "longDescription": "This property shall specify whether the metric can be used in a calculation.",
205                    "readonly": false
206                },
207                "CalculationAlgorithm": {
208                    "anyOf": [
209                        {
210                            "$ref": "#/definitions/CalculationAlgorithmEnum"
211                        },
212                        {
213                            "type": "null"
214                        }
215                    ],
216                    "description": "The calculation that is performed on a source metric to obtain the metric being defined.",
217                    "longDescription": "This property shall contain the calculation performed to obtain the metric.",
218                    "readonly": true
219                },
220                "CalculationParameters": {
221                    "description": "The metric properties that are part of a calculation that this metric definition defines.",
222                    "items": {
223                        "anyOf": [
224                            {
225                                "$ref": "#/definitions/CalculationParamsType"
226                            },
227                            {
228                                "type": "null"
229                            }
230                        ]
231                    },
232                    "longDescription": "This property shall list the metric properties that are part of a calculation that this metric definition defines.  This property should be present if `ImplementationType` contains `Synthesized` or `Calculated`.",
233                    "type": "array"
234                },
235                "CalculationTimeInterval": {
236                    "description": "The time interval over which the metric calculation is performed.",
237                    "longDescription": "This property shall specify the time interval over the metric calculation is performed.",
238                    "pattern": "^P(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+(.\\d+)?S)?)?$",
239                    "readonly": false,
240                    "type": [
241                        "string",
242                        "null"
243                    ]
244                },
245                "Calibration": {
246                    "description": "The calibration offset added to the metric reading.",
247                    "longDescription": "This property shall contain the calibration offset added to the metric reading.  The value shall have the units specified in the `Units` property.  The property is not meaningful when the `MetricType` property is `Discrete`.",
248                    "readonly": true,
249                    "type": [
250                        "number",
251                        "null"
252                    ]
253                },
254                "Description": {
255                    "anyOf": [
256                        {
257                            "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Description"
258                        },
259                        {
260                            "type": "null"
261                        }
262                    ],
263                    "readonly": true
264                },
265                "DiscreteValues": {
266                    "description": "This array property specifies possible values of a discrete metric.",
267                    "items": {
268                        "type": [
269                            "string",
270                            "null"
271                        ]
272                    },
273                    "longDescription": "The values of the property shall specify the possible values of the discrete metric.  This property shall have values when the `MetricType` property is `Discrete`.",
274                    "readonly": false,
275                    "type": "array"
276                },
277                "Id": {
278                    "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Id",
279                    "readonly": true
280                },
281                "Implementation": {
282                    "anyOf": [
283                        {
284                            "$ref": "#/definitions/ImplementationType"
285                        },
286                        {
287                            "type": "null"
288                        }
289                    ],
290                    "description": "The implementation of the metric.",
291                    "longDescription": "This property shall specify the implementation of the metric.",
292                    "readonly": true
293                },
294                "IsLinear": {
295                    "description": "An indication of whether the metric values are linear versus non-linear.",
296                    "longDescription": "This property shall indicate whether the metric values are linear versus non-linear.  Linear metrics can use a greater than relation to compared them.  An example of linear metrics include performance metrics.  Examples of non-linear metrics include error codes.",
297                    "readonly": false,
298                    "type": [
299                        "boolean",
300                        "null"
301                    ]
302                },
303                "LogicalContexts": {
304                    "description": "The logical contexts related to the metric.",
305                    "items": {
306                        "$ref": "http://redfish.dmtf.org/schemas/v1/PhysicalContext.json#/definitions/LogicalContext"
307                    },
308                    "longDescription": "This property shall contain the logical contexts related to the metric.  This property should be present when the `PhysicalContext` property does not provide complete information and additional context information is needed.  For example, if the metric refers to capacity or performance.",
309                    "readonly": true,
310                    "type": "array",
311                    "versionAdded": "v1_3_0"
312                },
313                "MaxReadingRange": {
314                    "description": "Maximum value for metric reading.",
315                    "longDescription": "The value shall indicate the highest possible value for a related MetricValue.  The value shall have the units specified in the property Units.  The property is not meaningful when the `MetricType` property is `Discrete`.",
316                    "readonly": true,
317                    "type": [
318                        "number",
319                        "null"
320                    ]
321                },
322                "MetricDataType": {
323                    "anyOf": [
324                        {
325                            "$ref": "#/definitions/MetricDataType"
326                        },
327                        {
328                            "type": "null"
329                        }
330                    ],
331                    "description": "The data type of the metric.",
332                    "longDescription": "This property shall specify the data-type of the metric.",
333                    "readonly": false
334                },
335                "MetricProperties": {
336                    "description": "The list of URIs with wildcards and property identifiers that this metric definition defines.  If a URI has wildcards, the wildcards are substituted as specified in the `Wildcards` property.",
337                    "format": "uri-reference",
338                    "items": {
339                        "type": [
340                            "string",
341                            "null"
342                        ]
343                    },
344                    "longDescription": "This array property shall list the URIs with wildcards and property identifiers that this metric defines.  A set of curly braces shall delimit each wildcard in the URI.  The corresponding entry in the `Wildcard` property shall replace each wildcard.  After each wildcard is replaced, it shall identify a resource property to which the metric definition applies.  The property identifiers portion of the URI shall follow RFC6901-defined JSON pointer notation rules.  This property should not be present if `ImplementationType` contains `Synthesized` or `Calculated`.",
345                    "readonly": false,
346                    "type": "array"
347                },
348                "MetricType": {
349                    "anyOf": [
350                        {
351                            "$ref": "#/definitions/MetricType"
352                        },
353                        {
354                            "type": "null"
355                        }
356                    ],
357                    "description": "The type of metric.",
358                    "longDescription": "This property shall specify the type of metric.",
359                    "readonly": false
360                },
361                "MinReadingRange": {
362                    "description": "Minimum value for metric reading.",
363                    "longDescription": "This property shall contain the lowest possible value for the metric reading.  The value shall have the units specified in the property Units.  The property is not meaningful when the `MetricType` property is `Discrete`.",
364                    "readonly": true,
365                    "type": [
366                        "number",
367                        "null"
368                    ]
369                },
370                "Name": {
371                    "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Name",
372                    "readonly": true
373                },
374                "OEMCalculationAlgorithm": {
375                    "description": "The OEM-defined calculation that is performed on a source metric to obtain the metric being defined.",
376                    "longDescription": "This property shall contain the OEM-defined calculation performed to obtain the metric.  This property shall be present if `CalculationAlgorithm` is `OEM`.",
377                    "readonly": true,
378                    "type": [
379                        "string",
380                        "null"
381                    ],
382                    "versionAdded": "v1_1_0"
383                },
384                "Oem": {
385                    "$ref": "http://redfish.dmtf.org/schemas/v1/Resource.json#/definitions/Oem",
386                    "description": "The OEM extension property.",
387                    "longDescription": "This property shall contain the OEM extensions.  All values for properties that this object contains shall conform to the Redfish Specification-described requirements."
388                },
389                "PhysicalContext": {
390                    "anyOf": [
391                        {
392                            "$ref": "http://redfish.dmtf.org/schemas/v1/PhysicalContext.json#/definitions/PhysicalContext"
393                        },
394                        {
395                            "type": "null"
396                        }
397                    ],
398                    "description": "The physical context of the metric.",
399                    "longDescription": "This property shall contain the physical context of the metric.",
400                    "readonly": true
401                },
402                "Precision": {
403                    "description": "Number of significant digits in the metric reading.",
404                    "longDescription": "This property shall specify the number of significant digits in the metric reading.  The property is not meaningful when the `MetricType` property is `Discrete`.",
405                    "readonly": true,
406                    "type": [
407                        "integer",
408                        "null"
409                    ]
410                },
411                "SensingInterval": {
412                    "description": "The time interval between when a metric is updated.",
413                    "longDescription": "This property shall specify the time interval between when a metric is updated.",
414                    "pattern": "^P(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+(.\\d+)?S)?)?$",
415                    "readonly": false,
416                    "type": [
417                        "string",
418                        "null"
419                    ]
420                },
421                "TimestampAccuracy": {
422                    "description": "The accuracy of the timestamp.",
423                    "longDescription": "This property shall specify the expected + or - variability of the timestamp.",
424                    "pattern": "^P(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+(.\\d+)?S)?)?$",
425                    "readonly": true,
426                    "type": [
427                        "string",
428                        "null"
429                    ]
430                },
431                "Units": {
432                    "description": "The units of measure for this metric.",
433                    "longDescription": "This property shall specify the units of the metric.  This property shall be consistent with the case-sensitive ('C/s' column) Unified Code for Units of Measure.  Note: Not all units of measure are covered by UCUM.",
434                    "readonly": false,
435                    "type": [
436                        "string",
437                        "null"
438                    ]
439                },
440                "Wildcards": {
441                    "description": "The wildcards and their substitution values for the entries in the `MetricProperties` array property.",
442                    "items": {
443                        "$ref": "#/definitions/Wildcard"
444                    },
445                    "longDescription": "The property shall contain a list of wildcards and their replacement strings, which are applied to the `MetricProperties` array property.  Each wildcard shall have a corresponding entry in this array property.",
446                    "type": "array"
447                }
448            },
449            "required": [
450                "@odata.id",
451                "@odata.type",
452                "Id",
453                "Name"
454            ],
455            "type": "object"
456        },
457        "MetricType": {
458            "description": "The type of metric.  Provides information to the client on how the metric can be handled.",
459            "enum": [
460                "Numeric",
461                "Discrete",
462                "Gauge",
463                "Counter",
464                "Countdown",
465                "String"
466            ],
467            "enumDescriptions": {
468                "Countdown": "The metric is a countdown metric.  The metric reading is a non-negative integer that decreases monotonically.  When a counter reaches its minimum, the value resets to preset value and resumes counting down.",
469                "Counter": "The metric is a counter metric.  The metric reading is a non-negative integer that increases monotonically.  When a counter reaches its maximum, the value resets to 0 and resumes counting.",
470                "Discrete": "The metric is a discrete metric.  The metric value is discrete.  The possible values are listed in the `DiscreteValues` property.",
471                "Gauge": "The metric is a gauge metric.  The metric value is a real number.  When the metric value reaches the gauge's extrema, it stays at that value, until the reading falls within the extrema.",
472                "Numeric": "The metric is a numeric metric.  The metric value is any real number.",
473                "String": "The metric is a non-discrete string metric.  The metric reading is a non-discrete string that displays some non-discrete, non-numeric data."
474            },
475            "enumLongDescriptions": {
476                "Discrete": "The metric values shall indicate discrete states."
477            },
478            "enumVersionAdded": {
479                "String": "v1_2_0"
480            },
481            "longDescription": "This property shall contain the type of metric.",
482            "type": "string"
483        },
484        "OemActions": {
485            "additionalProperties": true,
486            "description": "The available OEM-specific actions for this resource.",
487            "longDescription": "This type shall contain the available OEM-specific actions for this resource.",
488            "patternProperties": {
489                "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_]*$": {
490                    "description": "This property shall specify a valid odata or Redfish property.",
491                    "type": [
492                        "array",
493                        "boolean",
494                        "integer",
495                        "number",
496                        "null",
497                        "object",
498                        "string"
499                    ]
500                }
501            },
502            "properties": {},
503            "type": "object"
504        },
505        "Wildcard": {
506            "additionalProperties": false,
507            "description": "The wildcard and its substitution values.",
508            "longDescription": "This property shall contain a wildcard and its substitution values.",
509            "patternProperties": {
510                "^([a-zA-Z_][a-zA-Z0-9_]*)?@(odata|Redfish|Message)\\.[a-zA-Z_][a-zA-Z0-9_]*$": {
511                    "description": "This property shall specify a valid odata or Redfish property.",
512                    "type": [
513                        "array",
514                        "boolean",
515                        "integer",
516                        "number",
517                        "null",
518                        "object",
519                        "string"
520                    ]
521                }
522            },
523            "properties": {
524                "Name": {
525                    "description": "The string used as a wildcard.",
526                    "longDescription": "This property shall contain the string used as a wildcard.",
527                    "readonly": true,
528                    "type": [
529                        "string",
530                        "null"
531                    ]
532                },
533                "Values": {
534                    "description": "An array of values to substitute for the wildcard.",
535                    "items": {
536                        "type": [
537                            "string",
538                            "null"
539                        ]
540                    },
541                    "longDescription": "This property shall contain the list of values to substitute for the wildcard.",
542                    "readonly": true,
543                    "type": "array"
544                }
545            },
546            "type": "object"
547        }
548    },
549    "language": "en",
550    "owningEntity": "DMTF",
551    "release": "2022.1",
552    "title": "#MetricDefinition.v1_3_4.MetricDefinition"
553}