Queries the result of the instance and inspection feature that is implemented on your instance.

DAS supports the inspection and scoring feature. This feature allows you to inspect and score the health status of your instances on a regular basis. This helps you learn the running status of your databases. For more information, see Inspection and scoring.

Before you call this operation, make sure that the following conditions are met:

  • This operation is applicable to only ApsaraDB RDS for MySQL databases, self-managed MySQL databases on Elastic Compute Service (ECS) instances, self-managed MySQL databases in your data center, and ApsaraDB for Redis databases.
  • When you use an Alibaba Cloud SDK, make sure that the aliyun-sdk-core version is later than V4.3.3. We recommend that you use the latest version.
  • The SDK version for Database Autonomy Service (DAS) must be V1.0.3 or later.
  • When you use the SDK to call the DAS service, you must specify the region as cn-shanghai.

Request parameters

Parameter Type Required Example Description
Action String Yes GetInstanceInspections

The operation that you want to perform. Set the value to GetInstanceInspections.

EndTime String Yes 1608888296000

The end time of the query task. Unit: millisecond. The value is a UNIX timestamp.

Note The end time of the query task must be later than the start time of the query task.
Engine String Yes MySQL

The engine of the database. Valid values:

  • MySQL
  • Redis
Note Only MySQL and Redis are supported.
InstanceArea String Yes RDS

The database type to which the instance belongs. Valid values:

  • RDS: a cloud instance
  • ECS: a self-managed ECS instance
  • IDC: a self-managed instance that is not deployed on Alibaba Cloud
    Note IDC is the user data center.
PageNo String Yes 1

The number of the page to return. The value must be an integer that is larger than 0 and does not exceed the maximum value of the INTEGER data type. Default value: 1.

PageSize String Yes 10

The maximum number of entries to return on each page. Default value: 10.

StartTime String Yes 1608888296000

The start time of the query task. Unit: millisecond. The value is a UNIX timestamp.

SearchMap String No instanceId

The filter condition. You can use the following filter conditions:

  • instanceId: the ID of a single instance.
  • InstanceIds: a list of multiple instance IDs.
  • region: the region where the instance is deployed.

Response parameters

Parameter Type Example Description
Code String 200

The returned status code.

Data Struct

The details.

List Array of BaseInspection

The list of detailed information.

BaseInspection
Data String "data": { "hasDeadLock": false, "exceptionTableMap": {}, "bigTransactionCount": 0, "cpu": 4, "isRds": true, "rdsEnable": true, "enable": false, "activeSessions": [], "bigTransactionList": [], "bigSessionList": [ { "blockDuration": 0, "active": false, "Time": 0, "db": "" },

The returned data.

EndTime Long 1608888296000

The end time of the query task. Unit: millisecond. The value is a UNIX timestamp.

Note The end time of the query task must be later than the start time of the query task.
GmtCreate Long 1603247192000

The time when the task was created. Unit: millisecond. The value is a UNIX timestamp.

Instance Struct

The instance information.

AccountId String 108398049688****

The account ID. On the Security Settings page under Alibaba Cloud account management, you can query the ID of the logon account.

Engine String MySQL

The engine of the database. Valid values:

  • MySQL
  • Redis
Note Only MySQL and Redis are supported.
EngineVersion String 5.7

The version number of the database engine.

InstanceArea String RDS

The database type to which the instance belongs. Valid values:

  • RDS: a cloud instance
  • ECS: a self-managed ECS instance
  • IDC: a self-managed instance that is not deployed on Alibaba Cloud
    Note IDC is the user data center.
InstanceClass String rds.mysql.s2.xlarge

The instance type.

InstanceId String rm-bp10usoc1erj****

The ID of the instance.

NetworkType String Vpc

The network type of the instance.

NodeId String rm-bp10usoc1erj7****

The ID of the node on the instance.

Region String cn-hangzhou

The ID of the region where the instance is deployed.

Uuid String hdm_3063db6792965c080a4bcb6e6304****

The unique identifier of the instance.

VpcId String vpc-bp1knt7m55z9exoo7****

The ID of the VPC where the instance is deployed.

Score Integer 100

The inspection score of the instance.

ScoreMap String "cpu": 4

The deduction details for the score.

StartTime Long 1608888296000

The start time of the query task. Unit: millisecond. The value is a UNIX timestamp.

PageNo Long 1

The number of the page to return. The value must be an integer that is larger than 0 and does not exceed the maximum value of the INTEGER data type. Default value: 1.

PageSize Long 10

The maximum number of entries returned on each page. Default value: 10.

Total Long 4

The total number of entries returned.

Message String Successful

The returned message for the request.

Note If the request is successful, Successful is returned. If the request fails, an exception message that contains an error code is returned.
RequestId String B6D17591-B48B-4D31-9CD6-9B9796B2****

The ID of the request.

Success String true

Indicates whether the request was successful.

  • true: The request was successful.
  • false: The request failed.

Examples

Sample requests

http(s)://das.cn-shanghai.aliyuncs.com/?Action=GetInstanceInspections
&PageNo=1
&PageSize=10
&<Common request parameters>

Sample success responses

XML format

<GetInstanceInspectionsReponse>
  <RequestId> B6D17591-B48B-4D31-9CD6-9B9796B2****</RequestId>
  <Message>Successful</Message>
  <Data>
        <PageSize>10</PageSize>
        <Total>4</Total>
        <PageNo>1</PageNo>
        <List>
              <BaseInspection>
                    <GmtCreate>1603247192000</GmtCreate>
                    <Score>100</Score>
                    <ScoreMap>"cpu": 4</ScoreMap>
                    <EndTime>1608888296000</EndTime>
                    <StartTime>1608888296000</StartTime>
                    <Data>"data": {           "hasDeadLock": false,           "exceptionTableMap": {},           "bigTransactionCount": 0,           "cpu": 4,           "isRds": true,           "rdsEnable": true,           "enable": false,           "activeSessions": [],           "bigTransactionList": [],           "bigSessionList": [             {               "blockDuration": 0,               "active": false,               "Time": 0,               "db": ""             },</Data>
                    <Instance>
                          <Uuid>hdm_3063db6792965c080a4bcb6e6304****</Uuid>
                          <EngineVersion>5.7</EngineVersion>
                          <AccountId>123456678</AccountId>
                          <VpcId>vpc-bp1knt7m55z9exoo7****</VpcId>
                          <InstanceId>rm-bp10usoc1erj****</InstanceId>
                          <NetworkType>Vpc</NetworkType>
                          <InstanceArea>RDS</InstanceArea>
                          <NodeId>rm-bp10usoc1erj7****</NodeId>
                          <Region>cn-hangzhou</Region>
                          <InstanceClass>rds.mysql.s2.xlarge</InstanceClass>
                          <Engine>MySQL</Engine>
                    </Instance>
              </BaseInspection>
        </List>
  </Data>
  <Code>200</Code>
  <Success>true</Success>
</GetInstanceInspectionsReponse>

JSON format

{"RequestId":" B6D17591-B48B-4D31-9CD6-9B9796B2****",
"Message":"Successful",
"Data":{"PageSize":"10",
"Total":"4",
"PageNo":"1",
"List":{"BaseInspection":[{"GmtCreate":"1603247192000",
"Score":"100",
"ScoreMap":"\"cpu\": 4",
"EndTime":"1608888296000",
"StartTime":"1608888296000",
"Data":"\"data\": {           \"hasDeadLock\": false,           \"exceptionTableMap\": {},           \"bigTransactionCount\": 0,           \"cpu\": 4,           \"isRds\": true,           \"rdsEnable\": true,           \"enable\": false,           \"activeSessions\": [],           \"bigTransactionList\": [],           \"bigSessionList\": [             {               \"blockDuration\": 0,               \"active\": false,               \"Time\": 0,               \"db\": \"\"             },",
"Instance":{"Uuid":"hdm_3063db6792965c080a4bcb6e6304****",
"EngineVersion":"5.7",
"AccountId":"123456678",
"VpcId":"vpc-bp1knt7m55z9exoo7****",
"InstanceId":"rm-bp10usoc1erj****",
"NetworkType":"Vpc",
"InstanceArea":"RDS",
"NodeId":"rm-bp10usoc1erj7****",
"Region":"cn-hangzhou",
"InstanceClass":"rds.mysql.s2.xlarge",
"Engine":"MySQL"}}]}},
"Code":"200",
"Success":"true"}

Error codes

For a list of error codes, visit the API Error Center.