Custom Metrics File

Field Description

Table 1 describes the fields in the custom metrics file. Metrics can be customized through this file. For details, see Custom Metric Development.

Table 1 Fields in the custom metrics file

Field

Type

Description

version

String

Fixed value: 1.0.

name

String

Metric name. The value can contain a maximum of 128 characters and corresponds to the data name of the Prometheus API.

desc

String

Metric details. The value can contain a maximum of 1024 characters.

timestamp

timestamp

Timestamp when a metric is updated, in μs.

data_list

list

Array. The length cannot exceed 128 characters.

-value

float

Metric value.

-label

JSON

Metric label. The key and value of the JSON must be strings. The number of sub-elements in the JSON cannot exceed 10.

Restrictions

Data Example

{
  "version": "1.0",
  "name": "hccs_bandwidth",
  "desc": "hccs bandwidth info, unit is 'MB/s'.",
  "timestamp": 1766456419845127,
  "data_list": [
    {
      "value": 190.02,
      "label": {
        "numa": "2",
        "device": "hisi_sicl10_pa0",
        "link": "0",
        "direction": "in",
        "path": "P0->P1"
      }
    },
    {
      "value": 143.09,
      "label": {
        "numa": "2",
        "device": "hisi_sicl10_pa0",
        "link": "1",
        "direction": "in",
        "path": "P2->P1"
      }
    }
  ]
}