Get monitoring overview data - GetMetricOverview
Overview
Get the current monitoring indicator data of resources
💡 Note
For resource types and monitoring indicators, refer to the GetMetric document.
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is GetMetricOverview . | Yes |
PublicKey | string | The user's public key can be obtained from Console (opens in a new tab) | 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 |
---|---|---|---|
Region | string | Region. See List of Regions and Availability Zones | Yes |
Zone | string | Availability Zone. See Availability Zone List | Yes |
ProjectId | string | Project ID, if not filled in, the default project will be used. Sub-accounts must fill in the Project ID. | No |
ResourceType | string | Resource Type | Yes |
MetricName.N | string | Monitoring metric name, if omitted, all monitoring metric data will be returned. | No |
Limit | int | Data pagination value, default is 20 | No |
Offset | int | Data offset, default is 0 | No |
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 |
DataSet | array[ResourceItemSet] | JSON format monitoring data list | No |
RefreshTime | int | System update time, in Unix Timestamp format | No |
ResourceType | string | Resource Type | No |
TotalCount | int | Return Total Quantity | No |
Data Model
ResourceItemSet
Field Name | Type | Description Information | Required |
---|---|---|---|
ResourceId | string | Resource ID | Yes |
Name | string | Resource Name | No |
Example
Request Example
https://api.surfercloud.com/?action=GetMetricOverview
&Region=cn-bj2
&Zone=cn-bj2-04
&ResourceType=uhost
Response Example
{
"Action": "GetMetricOverviewResponse",
"DataSet": [
{
"BlockProcessCount": 0,
"CPUUtilization": 0,
"DataSpaceUsage": 0,
"DiskReadOps": 0,
"DiskWriteOps": 0,
"IORead": 0,
"IOWrite": 4641,
"MemUsage": 0,
"NICIn": 3002,
"NICOut": 3944,
"Name": "testtest",
"NetPacketIn": 2,
"NetPacketOut": 2,
"Remark": "",
"ResourceId": "uhost-xxx",
"RootSpaceUsage": 0,
"RunnableProcessCount": 0,
"Uuid": "0e796e5a-e004-42a2-92be-77277bde9144"
}
],
"RefreshTime": 1431507033,
"ResourceType": "uhost",
"RetCode": 0,
"TotalCount": 1
}