All Products
Search
Document Center

CloudMonitor:DescribeMonitoringAgentHosts

更新時間:Jul 26, 2024

Queries all hosts within the current Alibaba Cloud account, including hosts on which the CloudMonitor agent is installed and uninstalled.

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
cms:DescribeMonitoringAgentHostsget
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
KeyWordstringNo

The keyword that is used in fuzzy match.

host1
HostNamestringNo

The name of the host.

hostNam1
InstanceIdsstringNo

The ID of the instance.

i-a3d1q1pm2f9yr29e****
SerialNumbersstringNo

The serial number of the host.

After the CloudMonitor agent is installed on a host, a globally unique serial number is generated. A host that is not provided by Alibaba Cloud has a serial number instead of an instance ID.

Note This parameter can be used to accurately search for a monitored host.
a1ab31a3-1234-40f2-9e95-c8caa8f0****
PageNumberintegerNo

The number of the page to return.

1
PageSizeintegerNo

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

  • 10
  • 20
  • 50
  • 100
Note Although Alibaba Cloud does not limit the maximum value of this parameter, we recommend that you do not set it to an excessively large value. If you set it to an excessively large value, a timeout error may occur.
10
InstanceRegionIdstringNo

The region ID of the instance.

cn-hangzhou
AliyunHostbooleanNo

Specifies whether to query Elastic Compute Service (ECS) instances that are provided by Alibaba Cloud or to query hosts that are not provided by Alibaba Cloud. Valid values:

  • true (default value): queries all the ECS instances that are provided by Alibaba Cloud.
  • false: queries all the hosts that are not provided by Alibaba Cloud.
true
StatusstringNo

The status of the hosts that you want to query. Valid values:

  • Running: queries the hosts that are running.
  • Stopped: queries the hosts that are stopped, are not installed, or fail to be installed.
Running
SysomStatusstringNo

The status of SysOM. Valid values:

  • installing: SysOM is being installed.
  • running: SysOM is running.
  • stopped: SysOM is stopped.
  • uninstalling: SysOM is being uninstalled.
running

Response parameters

ParameterTypeDescriptionExample
object

The result of the request.

RequestIdstring

The ID of the request.

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

Indicates whether the call is successful. Valid values:

  • true: The call is successful.
  • false: The call fails.
true
Codestring

The HTTP status code.

Note The status code 200 indicates that the call is successful.
200
Messagestring

The error message.

The Request is not authorization.
PageNumberinteger

The page number of the returned page.

1
PageSizeinteger

The number of entries returned per page.

10
PageTotalinteger

The total number of returned pages.

50
Totalinteger

The total number of returned entries.

10
Hostsarray<object>

The information about the hosts.

object

The host.

SerialNumberstring

The serial number of the host. A host that is not provided by Alibaba Cloud has a serial number instead of an instance ID.

Note This parameter can be used to accurately search for a monitored host.
x12335-6cc8-4a22-9f21-1a00a719****
NatIpstring

The IP address of the Network Address Translation (NAT) gateway.

192.168.XX.XX
HostNamestring

The name of the host.

hostIP
AliUidlong

The ID of the Alibaba Cloud account.

103201326074****
NetworkTypestring

The network type.

vpc
InstanceIdstring

The ID of the instance.

i-a2d5q7pm3f9yr212****
isAliyunHostboolean

Indicates whether the host is provided by Alibaba Cloud. Valid values:

  • true: The host is provided by Alibaba Cloud.
  • false: The host is not provided by Alibaba Cloud.
true
EipAddressstring

The elastic IP address (EIP) of the host.

192.168.XX.XX
AgentVersionstring

The version of the CloudMonitor agent.

3.4.6
IpGroupstring

The IP address of the host.

Note Multiple IP addresses are separated with commas (,).
192.168.XX.XX
EipIdstring

The ID of the EIP.

eip-bp16i16k9gcezyfrp****
Regionstring

The ID of the region.

cn-hangzhou
InstanceTypeFamilystring

The type of the ECS instance.

ecs.n4
OperatingSystemstring

The operating system.

Linux

Examples

Sample success responses

JSONformat

{
  "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 codeError codeError messageDescription
400ParameterInvalidIllegal parameters.-
403AccessForbiddenUser not authorized to operate on the specified resource.-
404ResourceNotFoundThe specified resource is not found.The specified resource is not found.
500InternalErrorThe request processing has failed due to some unknown error.-

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

Change history

Change timeSummary of changesOperation
2023-05-25The Error code has changedView Change Details
2022-04-08API Description Update. The Error code has changedView Change Details