根據參數指定的模組類型,執行相應的動作。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
arms:DoInsightsAction |
get |
*All Resource
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| Module |
string |
是 |
模組類型
注意:上述功能尚處於灰度中,預設不開啟,如需要開啟請聯繫 arms 值班號。 枚舉值:
|
QueryTopo |
| Data |
string |
是 |
查詢參數,不同模組類型對應的查詢參數不同。
|
- QueryTopo { "regionId": "cn-hangzhou", "startTime": "2024-07-23 19:16:00", "endTime": "2024-07-23 20:16:00", # 限定拓扑查询范围为 2024-07-23 19:16:00至2024-07-23 20:16:00 "edgeFilter": { "includeTypes": [ "CALLS" # 限定结果拓扑中仅包含调用关系的边 ], "fromNodeFilter": { "includeEntityTypes": [ # 限定调用边的源节点类型必须为应用类型 "APPLICATION" ] }, "toNodeFilter": { "includeEntityTypes": [ # 限定调用边的目标节点必须为应用类型或者外部服务类型 "APPLICATION", "EXTERNAL_SERVICE" ] } }, "includeIsolatedNodes": false, # 结果拓扑中不包含孤立节点 "queryMetrics": true, # 同步查询RED指标 "timeoutSecs": 20, #最多用20秒来查询指标数据 "redOption": { # 查询的指标包括耗时、请求量,跳过错误数的查询 "skipRt": false, "skipCount": false, "skipError": true } } - QueryTopoRed { "regionId": "cn-hangzhou", "startTime": "2024-07-23 10:00:00", "endTime": "2024-07-23 14:00:00", "edgeIds": [ "097843bd50b06fbe2c6c1d8b761a7e8b" ], "nodeIds": [ "23d973261c6923da1b5b7a571ec1aa8b" ], "redOption": { # 查询的指标包括耗时、请求量,跳过错误数的查询 "skipCount": false, "skipError": true, "skipRt": false } } |
| RegionId |
string |
否 |
地域 ID。 |
cn-hangzhou |
拓撲由邊和節點構成,每條邊都有其對應的類型,每個節點都擁有一個對應的實體,每個實體都有其類型。透過設定邊的類型,節點的類型,查詢時間範圍等參數,可以過濾出需要的拓撲資料。
-
孤立節點
孤立節點指該節點與其他節點不存在任何關係
當欄位類型為 enum 時,表示該欄位的值來源於列舉,列舉的定義參見補充說明。
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
Schema of Response |
||
| RequestId |
string |
Id of the request |
626037F5-FDEB-45B0-804C-B3C92797A64E |
| Code |
integer |
狀態碼。200 為成功,其他狀態碼為異常。 |
200 |
| Success |
boolean |
查詢是否成功:
|
true |
| Message |
string |
呼叫失敗時返回的資訊。 |
success |
| Data |
string |
返回參數類型與傳入的 module 值相關。
} |
- QueryTopo { "nodes": [ { "nodeId": "3bfe1a747389273388182760406c079d", "entity": { "regionId": "cn-hangzhou", "appType": "TRACE", "appId": "xxxxxxxxxxxxxxxx", "name": "prometheus-pop-cn-hangzhou", "entityId": "3bfe1a747389273388182760406c079d", "firstSeenTms": 1721733226981, "lastSeenTms": 1721789171614, "type": "APPLICATION" }, "attrs": { "RED": { "count": 643848.0, "error": 0.0, "rt": 172.31701892372112 } } } ], "edges": [ { "from": "98b4184b22e588cf86e9a29aa4179606", "to": "98b4184b22e588cf86e9a29aa4179606", "type": "CALLS", "attrs": { "RED": { "count": 4.0, "error": 0.0, "rt": 37.0 } }, "edgeId": "5d611597e4b0013d0947615c9eca4de6", "firstSeenTms": 1721783795125, "lastSeenTms": 1721787371614 } ] } - QueryTopoRed { "nodeRed": { "361d9f32e58cef316bf2355f3ff05575": { "count": 3258110.0, "error": 74.0, "rt": 167.39844355494878 } }, "edgeRed": {} } |
-
Node 定義
{ "nodeId": string, #節點 ID "entity": Object, #實體資訊 根據 type 的不同,欄位會有不同的差異,詳見補充說明中的 實體資訊 "attrs": { #擴展屬性資訊 "RED": { # RED 指標 "count": double, #查詢時段的總請求量 "error": double, #查詢時段的總錯誤數 "rt": double, # 查詢時段的平均耗時,單位毫秒 } } } ```。 -
Edge 定義。
{ "from": string, #節點 ID "to": string, #節點 ID "type": enum, #詳見補充說明中的 邊類型 "attrs": { #擴展屬性資訊 "RED": { # RED 指標 "count": double, #查詢時段的總請求量 "error": double, #查詢時段的總錯誤數 "rt": double, #查詢時段的平均耗時,單位毫秒 } }, "edgeId": string, #邊 ID "firstSeenTms": long, #第一次發現該邊的時間,毫秒時間戳 "lastSeenTms": long, #最後一次發現該邊的時間,毫秒時間戳 }。 ```。
樣本
正常返回樣本
JSON格式
{
"RequestId": "626037F5-FDEB-45B0-804C-B3C92797A64E",
"Code": 200,
"Success": true,
"Message": "success",
"Data": "- QueryTopo\n\n\n\t{\n\t\t\"nodes\": [\n\t\t\t{\n\t\t\t\t\"nodeId\": \"3bfe1a747389273388182760406c079d\",\n\t\t\t\t\"entity\": {\n\t\t\t\t\t\"regionId\": \"cn-hangzhou\",\n\t\t\t\t\t\"appType\": \"TRACE\",\n\t\t\t\t\t\"appId\": \"xxxxxxxxxxxxxxxx\",\n\t\t\t\t\t\"name\": \"prometheus-pop-cn-hangzhou\",\n\t\t\t\t\t\"entityId\": \"3bfe1a747389273388182760406c079d\",\n\t\t\t\t\t\"firstSeenTms\": 1721733226981,\n\t\t\t\t\t\"lastSeenTms\": 1721789171614,\n\t\t\t\t\t\"type\": \"APPLICATION\"\n\t\t\t\t},\n\t\t\t\t\"attrs\": {\n\t\t\t\t\t\"RED\": {\n\t\t\t\t\t\t\"count\": 643848.0,\n\t\t\t\t\t\t\"error\": 0.0,\n\t\t\t\t\t\t\"rt\": 172.31701892372112\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t],\n\t\t\"edges\": [\n\t\t\t{\n\t\t\t\t\"from\": \"98b4184b22e588cf86e9a29aa4179606\",\n\t\t\t\t\"to\": \"98b4184b22e588cf86e9a29aa4179606\",\n\t\t\t\t\"type\": \"CALLS\",\n\t\t\t\t\"attrs\": {\n\t\t\t\t\t\"RED\": {\n\t\t\t\t\t\t\"count\": 4.0,\n\t\t\t\t\t\t\"error\": 0.0,\n\t\t\t\t\t\t\"rt\": 37.0\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"edgeId\": \"5d611597e4b0013d0947615c9eca4de6\",\n\t\t\t\t\"firstSeenTms\": 1721783795125,\n\t\t\t\t\"lastSeenTms\": 1721787371614\n\t\t\t}\n\t\t]\n\t}\n\n\n- QueryTopoRed\n\n\t{\n\t\t\"nodeRed\": {\n\t\t\t\"361d9f32e58cef316bf2355f3ff05575\": {\n\t\t\t\t\"count\": 3258110.0,\n\t\t\t\t\"error\": 74.0,\n\t\t\t\t\"rt\": 167.39844355494878\n\t\t\t}\n\t\t},\n\t\t\"edgeRed\": {}\n\t}\n\n"
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。