All Products
Search
Document Center

Application Real-Time Monitoring Service:DoInsightsAction

Last Updated:Mar 12, 2025

Performs the corresponding operation based on the specified module type.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
arms:DoInsightsActionget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ModulestringYes

The module type.

  • QueryTopo

    Queries topologies. A topology consists of edges and nodes, where each edge has a corresponding type and each node corresponds to an entity, which also has its type. By setting filter parameters such as the type of edges, the type of nodes, and the query time range, you can filter out the required topology data.

  • QueryTopoRed

    Queries topology RED metrics (number of requests, duration, number of errors). When querying a topology with the metric query option enabled, it might not be possible to retrieve all metric data due to the topology being too large. This module allows users to actively query for metric data of specified nodes and edges.

Note: The aforementioned modules are currently in a canary release phase and are not enabled by default. If you need to enable them, please contact the ARMS on-duty number.

Valid values:

  • QueryTopoRed
  • QueryTopo
QueryTopo
DatastringYes

The query parameters. Different module types correspond to different query parameters.

  • QueryTopo
{
    "regionId": string,  # The region ID.
    "startTime": string, #. The start time. Format: yyyy-MM-dd HH:mm:ss.
    "endTime": string, # The end time. Format: yyyy-MM-dd HH:mm:ss.
    "edgeFilter": { # The edge filter condition.
        "includeTypes": [enum], # The edge types to be included.
        "excludeTypes": [enum], # The edge types to be excluded.
        "fromNodeFilter": { # The source node filter condition.
            "includeEntityTypes": [enum] # The entity types to be included.
            "excludeEntityTypes": [enum] #The entity types to be excluded.
        },
        "toNodeFilter": {  #The target node filter condition.
            "includeEntityTypes": [enum] # The entity types to be included.
            "excludeEntityTypes": [enum] #The entity types to be excluded.
        }
    },
    "includeIsolatedNodes": boolean, #Specifies whether to include isolated nodes.
    "isolatedNodeFilter": { # The isolated node filter condition.
        "includeEntityTypes": [enum] # The entity types to be included.
        "excludeEntityTypes": [enum] #The entity types to be excluded.
     },
    "queryMetrics": boolean, # Specifies whether to query RED metrics along with metrics.
    "timeoutSecs": int, # The timeout period of metric query.
	"redOption": { # The metric query option.
		"skipRt": boolean,  # Specifies whether to skip querying the response time.
		"skipCount": boolean, # Specifies whether to skip querying the number of requests.
		"skipError": boolean # Specifies whether to skip querying the number of errors.
	}
}
  • QueryTopoRed
{
    "regionId": string,  # The region ID.
    "startTime": string, #. The start time. Format: yyyy-MM-dd HH:mm:ss.
    "endTime": string,   # The end time. Format: yyyy-MM-dd HH:mm:ss.
    "edgeIds": [string]  # The edge ID to be queried.
    "nodeIds": [string]  # The node ID to be queried.
    "redOption": { # The metric query option.
        "skipRt": boolean,  # Specifies whether to skip querying the response time.
        "skipRt": boolean,  # Specifies whether to skip querying the number of requests.
        "skipError": boolean # Specifies whether to skip querying the number of errors.
    }
}
- QueryTopo { "regionId": "cn-hangzhou", "startTime": "2024-07-23 19:16:00", "endTime": "2024-07-23 20:16:00", # Limit the topology query range to 2024-07-23 19:16:00 to 2024-07-23 20:16:00 "edgeFilter": { "includeTypes": [ "CALLS" # The resulting topology only contains edges of call relationships. ], "fromNodeFilter": { "includeEntityTypes": [ # The source node type of the call edge must be application type "APPLICATION" ] }, "toNodeFilter": { "includeEntityTypes": [ # The target node of the call edge must be an application type or an external service type. "APPLICATION", "EXTERNAL_SERVICE" ] } }, "includeIsolatedNodes": false, # The resulting topology does not contain isolated nodes "queryMetrics": true, # Synchronously query the RED indicator "timeoutSecs": 20, #It takes up to 20 seconds to query indicator data "redOption": { # The query indicators include time consumption, request volume, and query skip errors. "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": { # The query indicators include time consumption, request volume, and query skip errors. "skipCount": false, "skipError": true, "skipRt": false } }
RegionIdstringNo

The region ID.

cn-hangzhou

A topology consists of edges and nodes, where each edge has a corresponding type and each node corresponds to an entity, which also has its type. By setting filter parameters such as the type of edges, the type of nodes, and the query time range, you can filter out the required topology data.

  • Isolated node

    An isolated node is not related with other nodes.

The field type "enum" indicates that the field comes from an enumeration. For more information about enumeration, see supplementary notes.

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

Id of the request

626037F5-FDEB-45B0-804C-B3C92797A64E
Codeinteger

The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed.

200
Successboolean

Indicates whether the call was successful. Valid values:

  • true
  • false
true
Messagestring

The error message.

success
Datastring

The response parameters vary with the value of module.

  • QueryTopo

    {
    "nodes": [Object] # The nodes. For more information, see node details in the supplementary notes of response parameters.
    "edges": [Object] # The edges. For more information, see edge details in the supplementary notes of response parameters.
    }
    
  • QueryTopoRed

    {
      "nodeRed": {
      	"nodeId": {
      		"count": double, # The total number of requests in the specified time range.
      		"error": double, # The total number of errors in the specified time range.
      		"rt": double, # The average response time in the specified time range. Unit: milliseconds.
      	}
      },
      "edgeRed": {
      	"edgeId": {
      	    "count": double, # The total number of requests in the specified time range.
      		"error": double, # The total number of errors in the specified time range.
      		"rt": double, # The average response time in the specified time range. Unit: milliseconds.
      	}
      }
    

}

- 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 details

     {
     	"nodeId": string, # The node ID.
     	"entity": Object, # The entity information. The fields vary with the specified type. For more information, see the "Entity types" section of this topic.             
     	"attrs": { # The attributes.
     		"RED": { # The red metrics.
     			"count": double, # The total number of requests in the specified time range.
     			"error": double, # The total number of errors in the specified time range.
     			"rt": double, # The average response time in the specified time range. Unit: milliseconds.
     		}
     	}
     }
    
  • Edge details

     	{
     	"from": string, # The ID of the source node.
     	"to": string,   # The ID of the target node.
    "type": enum, # The edge type. For more information, see the supplementary notes.
     	"attrs": { # The attributes.
     		"RED": { # The red metrics.
     			"count": double, # The total number of requests in the specified time range.
     			"error": double, # The total number of errors in the specified time range.
     			"rt": double,    # The average response time in the specified time range. Unit: milliseconds.
     		}
     	},
     	"edgeId": string, # The edge ID.
     	"firstSeenTms": long, # The time when the edge was first identified. Unit: milliseconds. Format: a UNIX timestamp.
     	"lastSeenTms": long,  # The time when the edge was last identified. Unit: milliseconds. Format: a UNIX timestamp.
     }
    

Examples

Sample success responses

JSONformat

{
  "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"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2025-01-03The request parameters of the API has changedView Change Details
2024-07-31The request parameters of the API has changedView Change Details
2024-07-30The request parameters of the API has changedView Change Details