根据参数指定的模块类型,执行相应的动作。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
arms:DoInsightsAction |
get |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| 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"
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。