接口功能介绍
查询NAT网关设备的实时监控数据。
接口约束
regionID(资源池)存在,且存在NAT网关设备。
URI
POST /v4/monitor/query-natgw-latestmetricdata
请求参数
请求体body参数
参数 | 参数类型 | 是否必填 | 示例 | 说明 | 下级对象 |
---|---|---|---|---|---|
regionID | String | 是 | 81f7728662dd11ec810800155d307d5b | 资源池ID | |
deviceUUIDList | Array of String | 是 | ["natgw-h66gt05563"] | 查询设备ID列表,具体值参考监控对象查询返回字段deviceUUID | |
pageNo | Integer | 否 | 1 | 页码,默认为1 | |
pageSize | Integer | 否 | 1 | 页大小,默认为20 |
响应参数
参数 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|
statusCode | Integer | 返回状态码(800为成功,900为失败),默认值:800 | 800 | |
errorCode | String | 失败时的错误代码,参见公共错误码说明 | ||
message | String | 失败时的错误描述,一般为英文描述 | Success | |
msgDesc | String | 失败时的错误描述,一般为中文描述 | 成功 | |
returnObj | Object | 返回对象 | returnObj |
表returnObj
参数 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|
result | Array of Objects | 返回数据结果 | result | |
totalCount | Integer | 获取对象数据条数 | 138 | |
currentCount | Integer | 当前页记录数 | 1 | |
totalPage | Integer | 总页数 | 1 |
表result
参数 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|
regionID | String | 所属资源池ID | 81f7728662dd11ec810800155d307d5b | |
fUID | String | 唯一键 | natgw-h66gt05563 | |
fuserLastUpdated | String | 最近更新时间 | 2022-11-07 18:25:12 | |
deviceUUID | String | 设备ID | natgw-h66gt05563 | |
itemList | Object | 监控项内容 | itemList |
表itemList
参数 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|
samplingTime | Integer | 监控数据采集时间 | 1667816712 | |
{item1} | String | 监控项具体内容 | 13.33 | |
{item2} | String | 监控项具体内容 | 13.33 | |
... | String | 监控项具体内容 |
请求示例
POST /v4/monitor/query-natgw-latestmetricdata
请求体body
{
"regionID": "81f7728662dd11ec810800155d307d5b",
"deviceUUIDList": [
"natgw-h66gt05563"
],
"pageNo": 1,
"pageSize": 2
}
响应示例
{
"statusCode":800,
"returnObj":{
"result":[
{
"regionID":"81f7728662dd11ec810800155d307d5b",
"fUID":"natgw-h66gt05563",
"fuserLastUpdated":"2023-06-29 11:03:04",
"deviceUUID":"natgw-h66gt05563",
"itemList":{
"down_bandwidths":"108.33",
"down_bandwidths.192.168.0.11":"30.67",
"down_bandwidths.192.168.0.12":"0",
"down_bandwidths.192.168.0.14":"0",
"down_bandwidths.192.168.0.15":"13.33",
"down_bandwidths.192.168.0.16":"113.07",
"down_bandwidths.192.168.0.17":"0",
"down_bandwidths.192.168.0.20":"71.2",
"down_bandwidths.192.168.0.21":"28.8",
"down_bandwidths.192.168.0.3":"73.07",
"down_bandwidths.192.168.0.63":"0",
"down_bytes":"806",
"down_bytes.192.168.0.11":"158",
"down_bytes.192.168.0.12":"0",
"down_bytes.192.168.0.14":"0",
"down_bytes.192.168.0.15":"76",
"down_bytes.192.168.0.16":"656",
"down_bytes.192.168.0.17":"0",
"down_bytes.192.168.0.20":"414",
"down_bytes.192.168.0.21":"168",
"down_bytes.192.168.0.3":"332",
"down_bytes.192.168.0.63":"0",
"down_pkts":"0.27",
"down_pkts.192.168.0.11":"0.05",
"down_pkts.192.168.0.12":"0",
"down_pkts.192.168.0.14":"0",
"down_pkts.192.168.0.15":"0.02",
"down_pkts.192.168.0.16":"0.13",
"down_pkts.192.168.0.17":"0",
"down_pkts.192.168.0.20":"0.08",
"down_pkts.192.168.0.21":"0.03",
"down_pkts.192.168.0.3":"0.15",
"down_pkts.192.168.0.63":"0",
"nat_session":"68",
"nat_session.192.168.0.11":"1",
"nat_session.192.168.0.12":"1",
"nat_session.192.168.0.14":"10",
"nat_session.192.168.0.15":"11",
"nat_session.192.168.0.16":"8",
"nat_session.192.168.0.17":"15",
"nat_session.192.168.0.20":"6",
"nat_session.192.168.0.21":"2",
"nat_session.192.168.0.3":"13",
"nat_session.192.168.0.63":"9",
"nat_session_usage":"0.68",
"nat_session_usage.192.168.0.11":"0.01",
"nat_session_usage.192.168.0.12":"0.01",
"nat_session_usage.192.168.0.14":"0.1",
"nat_session_usage.192.168.0.15":"0.11",
"nat_session_usage.192.168.0.16":"0.08",
"nat_session_usage.192.168.0.17":"0.15",
"nat_session_usage.192.168.0.20":"0.06",
"nat_session_usage.192.168.0.21":"0.02",
"nat_session_usage.192.168.0.3":"0.13",
"nat_session_usage.192.168.0.63":"0.09",
"samplingTime":1688007784,
"spec_drop_pkts":"0",
"spec_drop_pkts.192.168.0.11":"0",
"spec_drop_pkts.192.168.0.12":"0",
"spec_drop_pkts.192.168.0.14":"0",
"spec_drop_pkts.192.168.0.15":"0",
"spec_drop_pkts.192.168.0.16":"0",
"spec_drop_pkts.192.168.0.17":"0",
"spec_drop_pkts.192.168.0.20":"0",
"spec_drop_pkts.192.168.0.21":"0",
"spec_drop_pkts.192.168.0.3":"0",
"spec_drop_pkts.192.168.0.63":"0",
"up_bandwidths":"434.73",
"up_bandwidths.192.168.0.11":"79.2",
"up_bandwidths.192.168.0.12":"0",
"up_bandwidths.192.168.0.14":"0",
"up_bandwidths.192.168.0.15":"13.33",
"up_bandwidths.192.168.0.16":"135.47",
"up_bandwidths.192.168.0.17":"0",
"up_bandwidths.192.168.0.20":"84",
"up_bandwidths.192.168.0.21":"49.6",
"up_bandwidths.192.168.0.3":"310",
"up_bandwidths.192.168.0.63":"0",
"up_bytes":"3254",
"up_bytes.192.168.0.11":"522",
"up_bytes.192.168.0.12":"0",
"up_bytes.192.168.0.14":"0",
"up_bytes.192.168.0.15":"76",
"up_bytes.192.168.0.16":"752",
"up_bytes.192.168.0.17":"0",
"up_bytes.192.168.0.20":"462",
"up_bytes.192.168.0.21":"276",
"up_bytes.192.168.0.3":"2109",
"up_bytes.192.168.0.63":"0",
"up_pkts":"0.27",
"up_pkts.192.168.0.11":"0.05",
"up_pkts.192.168.0.12":"0",
"up_pkts.192.168.0.14":"0",
"up_pkts.192.168.0.15":"0.02",
"up_pkts.192.168.0.16":"0.18",
"up_pkts.192.168.0.17":"0",
"up_pkts.192.168.0.20":"0.12",
"up_pkts.192.168.0.21":"0.07",
"up_pkts.192.168.0.3":"0.15",
"up_pkts.192.168.0.63":"0"
}
}
],
"totalCount":1,
"currentCount":1,
"totalPage":1
},
"errorCode":"",
"message":"Success",
"msgDesc":"成功"
}
状态码
状态码 | 描述 |
---|---|
200 | 请求成功 |
错误码
errorCode | 描述 |
---|---|
Monitor.DataQuery.RegionNotFound | 找不到资源池 |
Monitor.DataQuery.ItemNameUndefined | 监控项未定义 |
Monitor.DataQuery.QueryError | 查询数据失败 |
Monitor.DataQuery.AccessFailed | 访问内部系统失败 |
Monitor.DataQuery.ResponseError | 访问内部系统返回错误 |
其他 | 参见公共错误码说明 |