All Products
Search
Document Center

Application Real-Time Monitoring Service:DoInsightsAction

Last Updated:Sep 19, 2024

Performs the corresponding operation based on the specified module type.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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:
    • The required resource types are displayed in bold characters.
    • 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. Valid values:

  • QueryTopo: queries the topology.
  • QueryTopoRed: queries the red topology metrics, such as the number of requests, response time, and number of errors.

Notice: The preceding features are still in canary release and are disabled by default. If you need to enable these features, submit a ticket in the Application Real-Time Monitoring Service (ARMS) console.

QueryTopo
DatastringYes

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

  • QueryTopo
{
    "regionId": string,  # The region ID.
    "startTime": string, # The beginning of the time range to query, in the yyyy-MM-dd HH:mm:ss format.
    "endTime": string, # The end of the time range to query, in the yyyy-MM-dd HH:mm:ss format.
    "edgeFilter": { # The edge filter condition.
        "includeTypes": [EdgeType], # The edge types to be included.
        "excludeTypes": [EdgeType], # The edge types to be excluded.
        "fromNodeFilter": { # The source node filter condition.
            "includeEntityTypes": [EntityType] # The entity types to be included.
            "excludeEntityTypes": [EntityType] # The entity types to be excluded.
        },
        "toNodeFilter": {  # The destination node filter condition.
            "includeEntityTypes": [EntityType] # The entity types to be included.
            "excludeEntityTypes": [EntityType] # The entity types to be excluded.
        }
    },
    "includeIsolatedNodes": bool, # Specifies whether to include isolated nodes.
    "isolatedNodeFilter": { # The isolated node filter condition.
        "includeEntityTypes": [EntityType] # The entity types to be included.
        "excludeEntityTypes": [EntityType] # The entity types to be excluded.
     },
    "queryMetrics": boolean, # Specifies whether to query related red metrics during the metric query.
    "timeoutSecs": int, # The timeout duration for querying metrics.
	"redOption": { # A 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 beginning of the time range to query, in the yyyy-MM-dd HH:mm:ss format.
    "endTime": string,   # The end of the time range to query, in the yyyy-MM-dd HH:mm:ss format.
    "edgeIds": [string]  # The IDs of the edges to query.
    "nodeIds": [string]  # The IDs of the nodes to query.
    "redOption": { # A 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.
    }
}
- 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 } }
  • Topology

    A topology consists of edges and nodes. Each edge has its corresponding type, each node has a corresponding entity, and each entity has its type.

  • Isolated node

    An isolated node is not related with other nodes.

  • Entity types

    • APPLICATION: a regular application.
    • RPC: a port entity.
    • RPC_GROUP: a service entity that is categorized based on the type of the port, for example, a gRPC service entity.
    • EXTERNAL_SERVICE: an external service. All services, such as database services and Redis services, that cannot be monitored by an application performance management (APM) service are called external services.
    • APPLICATION_INST: an application instance entity, which is the instance that runs the application.
    • HOST: a regular host.
    • POD: a pod entity.
  • Topology edge types

    • CALL: The entity of the source node calls the entity of the destination node.
    • OWN: The entity of the source node owns the entity of the destination node.

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

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

Status code. 200 means success, other status codes are exceptions.

200
Successboolean

Whether the query is successful:

  • true
  • false
true
Messagestring

Information returned when the call fails.

success
Datastring

The response parameters vary with the value of module.

  • QueryTopo

    {
     "nodes": [Node] # The collection of nodes. For more information, see the "Node" section of this topic.
     "edges": [Edge] # The collection of edges. For more information, see the "Edge" section of this topic.
    }
    
  • 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

     {
     	"nodeId": string, # The node ID.
     	"entity": { # The entity information. The fields vary with the specified type. For more information, see the "Entity types" section of this topic.
     		EntityInfo
     	},
     	"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

     	{
     	"from": string, # The ID of the source node.
     	"to": string,   # The ID of the destination node.
     	"type": "CALL", # The type of the topology edge.
     	"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. This value is a timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.
     	"lastSeenTms": long,  # The time when the edge was last identified. This value is a timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.
     }
    
       ```
    
  • EntityInfo

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
2024-07-31The request parameters of the API has changedView Change Details
2024-07-30The request parameters of the API has changedView Change Details