All Products
Search
Document Center

Cloud Monitor:DescribeMonitoringAgentHosts

更新时间:Dec 02, 2025

You can call the DescribeMonitoringAgentHosts operation to query a list of all hosts, regardless of whether the CloudMonitor agent is installed.

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

cms:DescribeMonitoringAgentHosts

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

KeyWord

string

No

The keyword for a fuzzy search.

host1

HostName

string

No

The hostname.

hostNam1

InstanceIds

string

No

The instance ID.

i-a3d1q1pm2f9yr29e****

SerialNumbers

string

No

The serial number of the host.

A globally unique serial number is generated after the CloudMonitor agent is successfully installed on a host. Hosts that are not Alibaba Cloud instances do not have an instance ID, but have a serial number.

Note

Use this parameter to find a specific monitored host.

a1ab31a3-1234-40f2-9e95-c8caa8f0****

PageNumber

integer

No

The page number.

1

PageSize

integer

No

The number of entries to return on each page. Valid values:

  • 10

  • 20

  • 50

  • 100

Note

Alibaba Cloud does not limit the maximum value of this parameter. However, setting this parameter to a large value may cause a timeout.

10

InstanceRegionId

string

No

The region where the instance resides.

cn-hangzhou

AliyunHost

boolean

No

Specifies whether to filter for Alibaba Cloud Elastic Compute Service (ECS) instances. Valid values:

  • true (default): Returns only ECS instances.

  • false: Returns only hosts that are not ECS instances.

true

Status

string

No

The status of the host. Valid values:

  • Running: The host is running.

  • Stopped: The host is stopped, the agent is not installed, or the agent installation failed.

Running

SysomStatus

string

No

The status of SysOM. Valid values:

  • installing: SysOM is being enabled.

  • running: SysOM is running.

  • stopped: SysOM is stopped.

  • uninstalling: SysOM is being disabled.

running

Response elements

Element

Type

Description

Example

object

The response.

RequestId

string

The request ID.

63EEBB2A-9E51-41E4-9E83-5DE7F3B292E0

Success

boolean

Indicates whether the operation was successful. Valid values:

  • true: The operation was successful.

  • false: The operation failed.

true

Code

string

The status code.

Note

A status code of 200 indicates a successful response.

200

Message

string

The error message.

The Request is not authorization.

PageNumber

integer

The page number.

1

PageSize

integer

The number of entries per page.

10

PageTotal

integer

The number of pages.

50

Total

integer

The total number of entries.

10

Hosts

object

Host

array<object>

The list of hosts.

object

The host.

SerialNumber

string

The serial number of the host. Hosts that are not Alibaba Cloud instances do not have an instance ID, but have a serial number.

Note

Use this parameter to find a specific monitored host.

x12335-6cc8-4a22-9f21-1a00a719****

NatIp

string

The NAT IP address.

192.168.XX.XX

HostName

string

The hostname.

hostIP

AliUid

integer

The ID of the Alibaba Cloud account.

103201326074****

NetworkType

string

The network type.

vpc

InstanceId

string

The instance ID.

i-a2d5q7pm3f9yr212****

isAliyunHost

boolean

Indicates whether the host is an Alibaba Cloud instance. Valid values:

  • true: The host is an Alibaba Cloud instance.

  • false: The host is not an Alibaba Cloud instance.

true

EipAddress

string

The elastic IP address (EIP).

192.168.XX.XX

AgentVersion

string

The agent version.

3.4.6

IpGroup

string

The IP address of the host.

Note

Multiple IP addresses are separated by commas (,).

192.168.XX.XX

EipId

string

The ID of the EIP.

eip-bp16i16k9gcezyfrp****

Region

string

The region.

cn-hangzhou

InstanceTypeFamily

string

The ECS instance type family.

ecs.n4

OperatingSystem

string

The operating system.

Linux

Examples

Success response

JSON format

{
  "RequestId": "63EEBB2A-9E51-41E4-9E83-5DE7F3B292E0",
  "Success": true,
  "Code": "200",
  "Message": "The Request is not authorization.",
  "PageNumber": 1,
  "PageSize": 10,
  "PageTotal": 50,
  "Total": 10,
  "Hosts": {
    "Host": [
      {
        "SerialNumber": "x12335-6cc8-4a22-9f21-1a00a719****",
        "NatIp": "192.168.XX.XX",
        "HostName": "hostIP",
        "AliUid": 0,
        "NetworkType": "vpc",
        "InstanceId": "i-a2d5q7pm3f9yr212****",
        "isAliyunHost": true,
        "EipAddress": "192.168.XX.XX",
        "AgentVersion": "3.4.6",
        "IpGroup": "192.168.XX.XX",
        "EipId": "eip-bp16i16k9gcezyfrp****",
        "Region": "cn-hangzhou",
        "InstanceTypeFamily": "ecs.n4",
        "OperatingSystem": "Linux"
      }
    ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 ParameterInvalid Illegal parameters.
500 InternalError The request processing has failed due to some unknown error.
403 AccessForbidden User not authorized to operate on the specified resource.
404 ResourceNotFound The specified resource is not found. The specified resource is not found.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.