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.
Debugging
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:
|
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. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=InstallMonitoringAgent
&InstanceIds.1=i-m5e0k0bexac8tykr****
&<Common request parameters>
Sample success responses
XML
format
<InstallMonitoringAgent>
<Code>200</Code>
<Success>true</Success>
</InstallMonitoringAgent>
JSON
format
{
"Code": 200,
"Success": true
}
Error codes
For a list of error codes, visit the API Error Center.