All Products
Search
Document Center

ApsaraMQ for RocketMQ:GetInstanceInspection

Last Updated:Nov 02, 2026

Queries the inspection configuration of an instance.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

rocketmq:GetInstanceInspection

get

*Instance

acs:rocketmq:{#regionId}:{#accountId}:instance/{#instanceId}

None None

Request syntax

GET /api/v1/monitoring/instance-inspections/{instanceId} HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

instanceId

string

Yes

The instance ID. Wildcards are not supported.

rmq-cn-example

Request parameters

Parameter

Type

Required

Description

Example

regionId

string

Yes

The region ID.

cn-hangzhou

Response elements

Element

Type

Description

Example

object

regionId

string

The region ID.

cn-hangzhou

instanceId

string

The ID of the associated instance.

rmq-cn-example

configured

boolean

Indicates whether instance inspection is configured.

true

revision

integer

The configuration version. This parameter is required for updates. The value is 0 if the inspection has never been configured.

1

config

object

The unified configuration. This parameter is empty if the inspection is not configured or is disabled.

{}

items

array<object>

The independent configurations for each item. You can specify 1 to 20 items. The templateCode values must be unique. The entire array is replaced during updates.

[{"templateCode":"rmq.consumer-health","parameters":{"lookback":"1h"}},{"templateCode":"rmq.traffic-capacity","parameters":{"lookback":"6h"}}]

object

templateCode

string

The code of the inspection item.

rmq.consumer-health

parameters

any

The JSON object of parameters for this item. Do not use a JSON string. The parameters are validated against the parameter catalog. Omitted keys use default values. Pass an empty object {} if no parameters are required. Nested timeWindow or thresholds parameters are not allowed.

{"lookback":"1h","consumerDelayThresholdSeconds":600}

schedule

object

The unified schedule configuration.

{"enabled":true,"cron":"0 3 * * *"}

enabled

boolean

Indicates whether scheduled inspection is enabled. Manual inspection is still available if scheduled inspection is disabled.

true

cron

string

The cron expression in the Asia/Shanghai time zone. This parameter is required when enabled is set to true.

0 3 * * *

resourceScope

object

The resource scope within the instance. Valid values: All and Selected.

{"mode":"All"}

mode

string

The scope mode. Valid values:

  • All: Inspects all resources in the instance.

  • Selected: Inspects specified resources.

All

topics

array

The array of topic names. This parameter is required when the scope mode is set to Selected. The array can be empty. Do not pass this parameter when the scope mode is set to All.

["orders"]

string

The name of the topic within the selected inspection scope.

orders

consumerGroups

array

The array of consumer group names. This parameter is required when the scope mode is set to Selected. The array can be empty. You must specify at least one topic or consumer group. Do not pass this parameter when the scope mode is set to All.

["orders-g1"]

string

The name of the consumer group within the selected inspection scope.

orders-g1

items

array<object>

The inspection items and their associated resource types and counts.

[]

object

templateCode

string

The code of the inspection item.

rmq.consumer-health

name

string

The name of the inspection item.

Consumption health inspection

description

string

The description of the inspection item.

Checks consumption latency and consumption health

resourceTypes

array

The resource types associated with this item.

["ConsumerGroup"]

string

The resource type associated with the inspection item.

ConsumerGroup

resourceCount

integer

The associated resource count. This parameter is empty if no snapshot has been generated.

3

nextRunAt

string

The time of the next scheduled inspection. This parameter is empty if no scheduled task exists.

2026-09-09T03:00:00+08:00

lastRun

object

The result of the last inspection. This parameter is empty if no inspection has been executed.

{}

regionId

string

The region ID.

cn-hangzhou

instanceId

string

The ID of the associated instance.

rmq-cn-example

instanceName

string

The name of the instance.

Order instance

runId

string

The execution ID of the instance inspection.

inspection-run-001

triggerSource

string

The trigger source. Valid values: manual and cron.

manual

status

string

The execution status. Valid values: Pending, Running, Succeeded, PartiallySucceeded, and Failed.

Succeeded

requestedAt

string

The submission time in ISO 8601 format.

2026-09-08T00:00:00Z

finishedAt

string

The completion time. This parameter is empty if the inspection is not completed.

2026-09-08T00:01:00Z

timeRange

object

The time range of the inspection.

{}

startTime

string

The start time of the actual inspection window in ISO 8601 format.

2026-09-01T00:00:00Z

endTime

string

The end time of the actual inspection window in ISO 8601 format.

2026-09-08T00:00:00Z

configSnapshot

object

The configuration snapshot of the inspection. This snapshot is not overwritten by subsequent modifications.

{}

items

array<object>

The independent configurations for each item. You can specify 1 to 20 items. The templateCode values must be unique. The entire array is replaced during updates.

[{"templateCode":"rmq.consumer-health","parameters":{"lookback":"1h"}},{"templateCode":"rmq.traffic-capacity","parameters":{"lookback":"6h"}}]

object

templateCode

string

The code of the inspection item.

rmq.consumer-health

parameters

any

The JSON object of parameters for this item. Do not use a JSON string. The parameters are validated against the parameter catalog. Omitted keys use default values. Pass an empty object {} if no parameters are required. Nested timeWindow or thresholds parameters are not allowed.

{"lookback":"1h","consumerDelayThresholdSeconds":600}

schedule

object

The unified schedule configuration.

{"enabled":true,"cron":"0 3 * * *"}

enabled

boolean

Indicates whether scheduled inspection is enabled. Manual inspection is still available if scheduled inspection is disabled.

true

cron

string

The cron expression in the Asia/Shanghai time zone. This parameter is required when enabled is set to true.

0 3 * * *

resourceScope

object

The resource scope within the instance. Valid values: All and Selected.

{"mode":"All"}

mode

string

The scope mode. Valid values:

  • All: Inspects all resources in the instance.

  • Selected: Inspects specified resources.

All

topics

array

The array of topic names. This parameter is required when the scope mode is set to Selected. The array can be empty. Do not pass this parameter when the scope mode is set to All.

["orders"]

string

The name of the topic within the selected inspection scope.

orders

consumerGroups

array

The array of consumer group names. This parameter is required when the scope mode is set to Selected. The array can be empty. You must specify at least one topic or consumer group. Do not pass this parameter when the scope mode is set to All.

["orders-g1"]

string

The name of the consumer group within the selected inspection scope.

orders-g1

items

array<object>

The inspection item results and resource counts.

[]

array<object>

templateCode

string

The code of the inspection item.

rmq.consumer-health

name

string

The name of the inspection item.

Consumption health inspection

description

string

The description of the inspection item.

Checks consumption latency and consumption health

resourceTypes

array

The resource types associated with this item.

["ConsumerGroup"]

string

The resource type associated with the inspection item.

ConsumerGroup

resourceCount

integer

The associated resource count. This field is empty when no snapshot is generated.

3

status

string

The execution status. Valid values: Pending, Running, Succeeded, PartiallySucceeded, and Failed.

Succeeded

result

string

The inspection conclusion. Valid values: info and risk. This field is empty if the inspection is incomplete or fails.

Risk

headline

string

The summary of the inspection conclusion for this item. This field is empty if the summary is not yet generated.

Consumption delay exceeds the threshold

metrics

array<object>

The script evidence metrics.

[]

object

k

string

The name of the metric.

Consumption delay

v

string

The display value of the metric.

320 seconds

good

boolean

Indicates whether the metric is normal.

false

bad

boolean

Indicates whether the metric is a risk metric.

true

errorCode

string

The error code for execution failures. This field is empty if no error occurs.

INSPECTION_EXECUTION_INTERRUPTED

severity

string

The risk level explicitly provided by the script. Valid values: info, warning, and critical. This field is empty if the risk is unclassified or no risk exists.

warning

resourceSummary

object

The summary of resource conclusions for the current execution. This field is empty if historical reports are not recorded.

{"infoCount":2,"riskCount":1}

infoCount

integer

The number of resources with normal conclusions in the current snapshot.

2

riskCount

integer

The number of resources with risks in the current snapshot.

1

effectiveConfig

object

The execution configuration snapshot for this item.

{"templateCode":"rmq.consumer-health","parameters":{"lookback":"1h"}}

templateCode

string

The code of the inspection item.

rmq.consumer-health

parameters

any

The parameters frozen when the execution is accepted, including resolved default values.

{"lookback":"1h","consumerDelayThresholdSeconds":600}

timeRange

object

The actual evidence window for this item. This field is not returned for current status checks.

{"startTime":"2026-09-01T00:00:00Z","endTime":"2026-09-01T01:00:00Z"}

startTime

string

The start time of the actual inspection window in ISO 8601 format.

2026-09-01T00:00:00Z

endTime

string

The end time of the actual inspection window in ISO 8601 format.

2026-09-08T00:00:00Z

observedAt

string

The time when the current status was collected during execution, in ISO 8601 format.

2026-09-01T01:00:00Z

summary

object

The inspection result statistics. This field is empty if the inspection is not completed.

{}

result

string

The inspection conclusion. Valid values: info and risk. This field is empty if the inspection is incomplete or fails.

risk

infoCount

integer

The number of normal inspection items.

2

riskCount

integer

The number of risky inspection items.

1

aiSummary

object

The one-sentence summary of each inspection result generated by a large language model (LLM). This field includes the generation status and the original text upon success, and is empty if not generated.

{}

status

string

The generation status of the summary. Valid values: Pending, Running, Succeeded, and Failed. This status does not affect the inspection results.

Succeeded

text

string

The generated summary text. This field is returned only when the generation succeeds. The text contains a maximum of 200 characters and is not concatenated or truncated by the frontend.

No risks were found in this inspection, and the instance is running normally

report

object

The standalone risk diagnostic report. This field is empty if the inspection is normal or the report has not been successfully generated.

{}

reportId

string

The ID of the standalone risk diagnostic report. This field is returned only after the report is successfully generated.

irpt-example

inspectionRunId

string

The ID of the associated instance inspection execution.

irun-example

regionId

string

The region ID.

cn-hangzhou

instanceId

string

The ID of the associated instance.

rmq-cn-example

instanceName

string

The name of the instance.

Order instance

finishedAt

string

The time when the report generation was completed, in ISO 8601 format.

2026-09-18T08:02:00Z

timeRange

object

The time range of the current inspection.

{}

startTime

string

The start time of the actual inspection window in ISO 8601 format.

2026-09-01T00:00:00Z

endTime

string

The end time of the actual inspection window in ISO 8601 format.

2026-09-08T00:00:00Z

reportSummary

object

The statistics of successfully executed inspection items. This field includes only infoCount and riskCount.

{}

infoCount

integer

The number of successfully executed inspection items that did not trigger any risks.

4

riskCount

integer

The number of successfully executed inspection items where attention is set to true.

1

overview

string

The overall diagnostic overview of multiple risks.

Consumer lag and capacity limits may be correlated

findings

array<object>

The causes, evidence, impacts, and recommendations for all risk items in the current inspection.

[]

array<object>

templateCode

string

The code of the inspection item whose risk is confirmed by the script.

rmq.consumer-health

cause

string

The analysis of the risk cause, distinguishing between confirmed facts and speculation.

The consumer processing speed may be insufficient

confidence

string

The strength of the evidence for the cause. This is not the risk level.

likely

evidence

array

The actual inspection evidence that supports the analysis.

["Consumer lag of 60 seconds"]

string

A piece of inspection evidence that supports the analysis of the risk cause.

Consumer lag of 60 seconds

impact

string

The business impact and scope.

Increased message processing latency

recommendations

array

The processing and verification recommendations for the customer.

["Check the consumer processing time"]

string

An actionable processing or verification recommendation for the customer.

Check the consumer processing time

resource

object

The specific resource associated with the risk.

{}

type

string

The type of the discovered resource.

group

id

string

The identifier of the discovered resource.

GID-orders

name

string

The display name of the resource.

Order consumer group

riskType

string

The specific risk type.

Consumption delay

source

string

The risk source, such as script or diagnosis.

script

timeRange

object

The actual time range of this piece of evidence.

{}

startTime

string

The start time of the actual inspection window in ISO 8601 format.

2026-09-01T00:00:00Z

endTime

string

The end time of the actual inspection window in ISO 8601 format.

2026-09-08T00:00:00Z

observations

array

The specific observations and metric evidence.

[]

string

A specific observation or metric record within the inspection window.

The consumption latency of consumer group orders-g1 increased from 10 seconds to 60 seconds

boundary

string

The located scope and uncertain boundaries.

Consumption phase

location

string

The resources and locations that the customer can review.

Consumer group monitoring

alternatives

array

The verified alternative causes.

[]

string

A verified alternative cause and its verification result.

Verified that the production rate remained stable, and no sudden increase in production traffic was found

missingEvidence

array

The missing causal evidence.

[]

string

A piece of missing evidence required to further confirm the cause.

Missing consumer client logs during the alert period

verification

array

The review criteria after resolution.

[]

string

A review criterion after resolution.

Consumption latency remains below 30 seconds for 10 consecutive minutes

observedAt

string

The time when the current status was collected during execution, in ISO 8601 format.

2026-09-01T01:00:00Z

markdown

string

The Markdown body of the report, which shares the same diagnostic conclusions as the HTML version.

# Instance Inspection Diagnostic Report

html

string

The securely rendered HTML body of the report, which does not contain scripts or external resources.

Instance Inspection Diagnostic Report

templateVersion

string

The version of the report template. This field can be empty for historical reports.

inspection-v2.1

completion

string

The completion status of the diagnosis. Valid values: complete and partial.

complete

coverage

array<object>

The completion status of each check and diagnostic task.

[]

array<object>

templateCode

string

The code of the inspection item.

rmq.consumer-health

name

string

The name of the inspection item.

Consumption health

status

string

The execution status of the script.

Succeeded

result

string

The risk result of the script. This field is empty if the execution fails.

risk

diagnosisStatus

string

The status of the cause diagnosis. Valid values: NotRequired, Succeeded, Failed, and TimedOut.

Succeeded

timeRange

object

The actual evidence window for this item. This field is not returned for current status checks.

{"startTime":"2026-09-01T00:00:00Z","endTime":"2026-09-01T01:00:00Z"}

startTime

string

The start time of the actual inspection window in ISO 8601 format.

2026-09-01T00:00:00Z

endTime

string

The end time of the actual inspection window in ISO 8601 format.

2026-09-08T00:00:00Z

observedAt

string

The time when the current status was collected during execution, in ISO 8601 format.

2026-09-01T01:00:00Z

notification

object

The cloud monitoring risk event delivery status.

{}

status

string

The notification status. Valid values: NotRequired, NotConfigured, Pending, Sent, and Failed. A value of Sent indicates only that CloudMonitor has accepted the event.

Sent

eventId

string

The stable ID of the CloudMonitor event. This field is empty if no event exists.

inspection-event-001

Examples

Success response

JSON format

{
  "regionId": "cn-hangzhou",
  "instanceId": "rmq-cn-example",
  "configured": true,
  "revision": 1,
  "config": {
    "items": [
      {
        "templateCode": "rmq.consumer-health",
        "parameters": "{\"lookback\":\"1h\",\"consumerDelayThresholdSeconds\":600}"
      }
    ],
    "schedule": {
      "enabled": true,
      "cron": "0 3 * * *"
    },
    "resourceScope": {
      "mode": "All",
      "topics": [
        "orders"
      ],
      "consumerGroups": [
        "orders-g1"
      ]
    }
  },
  "items": [
    {
      "templateCode": "rmq.consumer-health",
      "name": "Consumer health inspection",
      "description": "Checks consumption latency and consumer health",
      "resourceTypes": [
        "ConsumerGroup"
      ],
      "resourceCount": 3
    }
  ],
  "nextRunAt": "2026-09-09T03:00:00+08:00",
  "lastRun": {
    "regionId": "cn-hangzhou",
    "instanceId": "rmq-cn-example",
    "instanceName": "Order instance",
    "runId": "inspection-run-001",
    "triggerSource": "manual",
    "status": "Succeeded",
    "requestedAt": "2026-09-08T00:00:00Z",
    "finishedAt": "2026-09-08T00:01:00Z",
    "timeRange": {
      "startTime": "2026-09-01T00:00:00Z",
      "endTime": "2026-09-08T00:00:00Z"
    },
    "configSnapshot": {
      "items": [
        {
          "templateCode": "rmq.consumer-health",
          "parameters": "{\"lookback\":\"1h\",\"consumerDelayThresholdSeconds\":600}"
        }
      ],
      "schedule": {
        "enabled": true,
        "cron": "0 3 * * *"
      },
      "resourceScope": {
        "mode": "All",
        "topics": [
          "orders"
        ],
        "consumerGroups": [
          "orders-g1"
        ]
      }
    },
    "items": [
      {
        "templateCode": "rmq.consumer-health",
        "name": "Consumer health inspection",
        "description": "Checks consumption latency and consumer health",
        "resourceTypes": [
          "ConsumerGroup"
        ],
        "resourceCount": 3,
        "status": "Succeeded",
        "result": "Risk",
        "headline": "Consumption delay exceeds the threshold",
        "metrics": [
          {
            "k": "Consumption delay",
            "v": "320 seconds",
            "good": false,
            "bad": true
          }
        ],
        "errorCode": "INSPECTION_EXECUTION_INTERRUPTED",
        "severity": "warning",
        "resourceSummary": {
          "infoCount": 2,
          "riskCount": 1
        },
        "effectiveConfig": {
          "templateCode": "rmq.consumer-health",
          "parameters": "{\"lookback\":\"1h\",\"consumerDelayThresholdSeconds\":600}"
        },
        "timeRange": {
          "startTime": "2026-09-01T00:00:00Z",
          "endTime": "2026-09-08T00:00:00Z"
        },
        "observedAt": "2026-09-01T01:00:00Z"
      }
    ],
    "summary": {
      "result": "risk",
      "infoCount": 2,
      "riskCount": 1
    },
    "aiSummary": {
      "status": "Succeeded",
      "text": "No risks were found in this inspection, and the instance is running normally"
    },
    "report": {
      "reportId": "irpt-example",
      "inspectionRunId": "irun-example",
      "regionId": "cn-hangzhou",
      "instanceId": "rmq-cn-example",
      "instanceName": "Order instance",
      "finishedAt": "2026-09-18T08:02:00Z",
      "timeRange": {
        "startTime": "2026-09-01T00:00:00Z",
        "endTime": "2026-09-08T00:00:00Z"
      },
      "reportSummary": {
        "infoCount": 4,
        "riskCount": 1
      },
      "overview": "Consumption latency and capacity limits may be related",
      "findings": [
        {
          "templateCode": "rmq.consumer-health",
          "cause": "The consumer processing speed may be insufficient",
          "confidence": "likely",
          "evidence": [
            "Consumption latency of 60 seconds"
          ],
          "impact": "Increased message processing latency",
          "recommendations": [
            "Check the processing time of the consumer"
          ],
          "resource": {
            "type": "group",
            "id": "GID-orders",
            "name": "Order consumer group"
          },
          "riskType": "Consumption delay",
          "source": "script",
          "timeRange": {
            "startTime": "2026-09-01T00:00:00Z",
            "endTime": "2026-09-08T00:00:00Z"
          },
          "observations": [
            "The consumption latency of consumer group orders-g1 increased from 10 seconds to 60 seconds"
          ],
          "boundary": "Consumption phase",
          "location": "Consumer group monitoring",
          "alternatives": [
            "Verified that the production rate remained stable, and no sudden increase in production traffic was found"
          ],
          "missingEvidence": [
            "Missing consumer client logs during the alert period"
          ],
          "verification": [
            "Consumption latency remains below 30 seconds for 10 consecutive minutes"
          ],
          "observedAt": "2026-09-01T01:00:00Z"
        }
      ],
      "markdown": "# Instance inspection diagnostic report",
      "html": "Instance inspection diagnostic report",
      "templateVersion": "inspection-v2.1",
      "completion": "complete",
      "coverage": [
        {
          "templateCode": "rmq.consumer-health",
          "name": "Consumption health",
          "status": "Succeeded",
          "result": "risk",
          "diagnosisStatus": "Succeeded",
          "timeRange": {
            "startTime": "2026-09-01T00:00:00Z",
            "endTime": "2026-09-08T00:00:00Z"
          },
          "observedAt": "2026-09-01T01:00:00Z"
        }
      ]
    },
    "notification": {
      "status": "Sent",
      "eventId": "inspection-event-001"
    }
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.