實時監控數據:NAT網關
更新時(shi)間 2023-07-19 11:41:00
最近更新時間: 2023-07-19 11:41:00
分(fen)享(xiang)文章
接口功能介紹
查詢NAT網(wang)關設備的實時監控數(shu)據。
接口約束
regionID(資(zi)源池)存(cun)(cun)在,且存(cun)(cun)在NAT網(wang)關(guan)設備。
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 | 訪問內部系統返回錯誤 |
| 其他 | 參見公共錯誤碼說明 |