Get the metric list associated with cloud products - GetProductMetrics
Overview
Get the metric list associated with cloud products
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is GetProductMetrics . | Yes |
PublicKey | string | The user’s public key can be obtained from Console | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
ProductKey | string | ProductKey, SeeProduct Introduce | Yes |
Response Field
Field Name | Type | Description Information | Required |
---|---|---|---|
RetCode | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. | Yes |
Action | string | Operation command name. | Yes |
Message | string | Returns an error message, providing detailed description when RetCode is non-zero. | No |
Data | GetProductMetricsRespData | Return Data | Yes |
Data Model
GetProductMetricsRespData
Field Name | Type | Description Information | Required |
---|---|---|---|
Total | int | Total number of query results | No |
List | array[Metirc] | Metric List | No |
UnitConfigs | array[MetricUnitConfig] | Unit Conversion Information | No |
Metirc
Field Name | Type | Description Information | Required |
---|---|---|---|
ProductType | int | Cloud Product ID | No |
UnitID | int | Unit ID | No |
MetricID | int | Metric ID | No |
Metric | string | Unique Indicator Identifier (uhost_cpu_usage) | No |
MetricEnName | string | Metric English Name | No |
MetricChName | string | Metric Chinese Name | No |
MetricEnDesc | string | Metric English Description | No |
MetricChDesc | string | Metric Chinese Description | No |
MetricGroup | string | Metric Classification/Metric Group | No |
FrequencyMs | int | Reporting Frequency Milliseconds | No |
Unit | MetricUnit | Unit | No |
CreatedBy | string | Creator | No |
CreatedAt | string | Creation Time | No |
UpdatedBy | string | Modifier | No |
UpdatedAt | string | Modification Time | No |
MetricUnitConfig
Field Name | Type | Description Information | Required |
---|---|---|---|
UnitCnNames | array[string] | List of Metric Chinese Names | No |
UnitEnNames | array[string] | List of Indicator English Names | No |
ConversionFactor | int | Conversion Factor | No |
ConversionRules | array[ConversionRule] | Conversion Rules | No |
ConversionRule
Field Name | Type | Description Information | Required |
---|---|---|---|
From | string | Source | No |
To | string | Target | No |
ConversionFactor | int | Conversion Factor | No |
MetricUnit
Field Name | Type | Description Information | Required |
---|---|---|---|
UnitID | int | Unit ID | No |
GroupId | int | GroupId | No |
UnitEnName | string | English Name of the Unit | No |
UnitChName | string | Company Chinese Name | No |
UnitDesc | string | Unit Description | No |
ConversionFactor | int | Conversion Factor | No |
CreatedBy | string | Creator | No |
UpdatedBy | string | Modifier | No |
CreatedAt | string | Creation Time | No |
UpdatedAt | string | Modification Time | No |
DeletedAt | int | Deletion Time | No |
Example
Request Example
https://api.surfercloud.com/?Action=GetProductMetrics
&ProductKey=jVhlepWB
&MetricGroup=XQkJSCbW
Response Example
{
"Action": "GetProductMetricsResponse",
"Data": {
"List": [
{
"ChartLabel": "",
"CreatedAt": "2024-09-27T16:37:40+08:00",
"CreatedBy": "admin",
"DeletedAt": 0,
"FrequencyMs": 60000,
"Groups": [
"GPU 卡数量监控"
],
"ID": 781,
"Metric": "cloudwatch_available_gpu_num_by_driver",
"MetricChDesc": "",
"MetricChName": "驱动识别的GPU卡数量",
"MetricDesc": "",
"MetricEnDesc": "",
"MetricEnName": "cloudwatch_available_gpu_num_by_driver",
"MetricGroup": "",
"MetricID": 224968131907200,
"MetricName": "驱动识别的GPU卡数量",
"ProductType": 1,
"Remark": "",
"Unit": {
"ConversionFactor": 1000,
"CreatedAt": "2025-05-21T19:52:38+08:00",
"CreatedBy": "admin",
"DeletedAt": 0,
"GroupId": 37,
"UnitChName": "个",
"UnitDesc": "counts",
"UnitEnName": "counts",
"UnitID": 26,
"UnitName": "个",
"UpdatedAt": "2025-05-28T15:45:48+08:00",
"UpdatedBy": "admin"
},
"UnitID": 26,
"UpdatedAt": "2025-03-03T23:11:58+08:00",
"UpdatedBy": "admin"
}
],
"Total": 1,
"UnitConfigs": [
{
"ConversionFactor": 1000,
"ConversionRules": [
{
"ConversionFactor": 10,
"From": "千个/s",
"To": "万个/s"
}
],
"UnitCnNames": [
"个/s",
"千个/s",
"万个/s",
"千万个/s"
],
"UnitEnNames": [
"counts/s",
"Thousand counts/s",
"Ten thousand counts/s",
"Ten Million counts/s"
],
"UnitNames": [
"个/s",
"千个/s",
"万个/s",
"千万个/s"
]
}
]
},
"RetCode": 0,
"TotalCount": 1,
"TraceId": "0ee3394b-c8d9-453c-b8a6-1b09f2fe5ad6"
}