Installs the Cloud Monitor agent on a specified Elastic Compute Service (ECS) instance.

This operation is applicable only to ECS instances.

Ensure that the Server Guard agent is installed on your ECS instance before you call this operation. The Server Guard agent is integrated into security images and installed by default on ECS instances. You can log on to the Server Guard console to view the status of the agent on each ECS instance.

The success rate of installing the Cloud Monitor agent by calling this operation is about 95%. If the installation fails, manually install the agent on the ECS instance. For more information about the Cloud Monitor agent, see Cloud Monitor GoLang agent overview and Install the Cloud Monitor GoLang agent.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes InstallMonitoringAgent

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

InstanceIds.N RepeatList Yes i-m5e0k0bexac8tykr****

The ID of the ECS instance. Valid values of N: 1 to 10.

Force Boolean No true

Indicates whether to forcibly install the agent. Valid values:

  • true: This is the default value.
  • false

Response parameters

Parameter Type Example Description
RequestId String host-abc12356

The ID of the request.

Code String 200

The HTTP status code.

Note The status code 200 indicates that the call was successful.
Success Boolean true

Indicates whether the call was successful. The value true indicates a success. The value false indicates a failure.

Message String The specified resource is not found.

The returned message.


Sample requests

&<Common request parameters>

Sample success responses

XML format


JSON format

    "Code": 200,
    "Success": true

Error codes

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