获取监控概况数据 - GetMetricOverview

获取资源当前各项监控指标数据 note: 资源类型及监控指标,参见 GetMetric文档

Request Parameters

Parameter nameTypeDescriptionRequired
RegionString地域,参见 地域和可用区列表Yes
ZoneString可用区,参见 地域和可用区列表Yes
ProjectIdString项目ID,不填为默认项目。子账户必须填写项目IDNo
MetricName.nString监控指标名称,若省略则返回所有监控指标数据No
ResourceTypeString资源类型Yes
LimitInteger数据分页值,默认为20No
OffsetInteger数据偏移量,默认为0No

注解:资源类型及监控指标,参见 GetMetric文档

Response Elements

Parameter nameTypeDescription
ActionString响应动作
DataSetsArrayJSON格式监控数据列表,见ResourceItem
RetCodeInteger执行成功与否,0 表示成功,其他值则为错误代码
RefreshTimeInteger系统更新时间,格式为Unix Timestamp
ResourceTypeString资源类型
TotalCountInteger返回总数量

ResourceItem

Parameter nameTypeDescription
ResourceIdString资源ID
NameString资源名称
MetricNameString对应监控项的监控数据

Request Example

http(s)://api.ucloud.cn/?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-zo0gxg",
             "RootSpaceUsage": 0,
             "RunnableProcessCount": 0,
             "Uuid": "0e796e5a-e004-42a2-92be-77277bde9144"
         }   
     ],
     "RefreshTime": 1431507033,    
     "ResourceType": "uhost",
     "RetCode": 0,
     "TotalCount": 1
 }