获取BEC虚机实例监控
所有文档

          边缘计算节点 BEC

          获取BEC虚机实例监控

          获取BEC虚机实例监控

          接口描述

          获取BEC虚机实例监控

          请求结构

          GET /v1/vm/instance/{vmID}/metrics/{metricsType}?offsetInSeconds={offsetInSeconds} HTTP/1.1
          Host: bec.baidubce.com
          Authorization: authorization string

          请求头域

          除公共头域外,无其它特殊头域。

          请求参数

          参数名称 类型 是否必需 参数位置 描述
          vmID String URL参数 虚机实例id
          metricsType String URL参数 监控类型(CPU,MEMORY,BANDWIDTH_RECEIVE,BANDWIDTH_TRANSMIT,TRAFFIC_RECEIVE,TRAFFIC_TRANSMIT,REQUEST_NUMBER,REQUEST_RATE,REQUEST_DELAY)
          offsetInSeconds int Query参数 偏移秒

          响应头域

          除公共头域外,无其它特殊头域。

          响应参数

          参数名称 类型 描述
          metrics List 返回值列表
          maxValue BigDecimal 最大值
          avgValue BigDecimal 平均值

          错误码

          请参照前文的统一错误码和平台错误码。

          请求示例

          GET /v1/vm/instance/vm-6ahy6dli/metrics/CPU?offsetInSeconds=3600 HTTP/1.1
          Host: bec.baidubce.com
          Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de

          响应示例

          HTTP/1.1 200 OK
          Content-Type: application/json;charset=UTF-8
          Date: Wed, 08 Jul 2015 03:28:11 GMT
          x-bce-request-id: d8752367-38e8-45e4-b4c7-e53be3137ce5
          Server: BWS
          
          {
          "result":{
              "avgValue":0.011866,
              "maxValue":0.08076923076923076,
              "metrics":[
                  {
                      "timeInSecond":1592901412,
                      "value":0.003846153846153846
                  },
                  {
                      "timeInSecond":1592901712,
                      "value":0
                  },
                  {
                      "timeInSecond":1592902012,
                      "value":0.003846153846153846
                  },
                  {
                      "timeInSecond":1592902312,
                      "value":0
                  },
                  {
                      "timeInSecond":1592902612,
                      "value":0.003846153846153846
                  },
                  {
                      "timeInSecond":1592902912,
                      "value":0.0037356250000000002
                  },
                  {
                      "timeInSecond":1592903212,
                      "value":0.08076923076923076
                  },
                  {
                      "timeInSecond":1592903512,
                      "value":0.04293590277777778
                  },
                  {
                      "timeInSecond":1592903812,
                      "value":0.003846153846153846
                  },
                  {
                      "timeInSecond":1592904112,
                      "value":0
                  },
                  {
                      "timeInSecond":1592904412,
                      "value":0.003846153846153846
                  },
                  {
                      "timeInSecond":1592904712,
                      "value":0.003846153846153846
                  },
                  {
                      "timeInSecond":1592905012,
                      "value":0.0037356250000000002
                  }]
          },
          "success":true
          }

          Model对象定义

          Metric

          参数名称 类型 描述
          timeInSecond int 时间戳
          value BigDecimal 大小
          上一篇
          获取BEC虚机实例详情
          下一篇
          更新BEC虚机实例