Panggil operasi InstallMonitoringAgent untuk menginstal agen CloudMonitor pada host Alibaba Cloud yang ditentukan.
Deskripsi operasi
Prasyarat
Pastikan Cloud Assistant terinstal pada host Alibaba Cloud. Untuk informasi lebih lanjut, lihat Ikhtisar Cloud Assistant.
Informasi latar belakang
API ini hanya berlaku untuk host Alibaba Cloud, yang merupakan instance Elastic Compute Service (ECS). Tingkat keberhasilan menginstal agen CloudMonitor menggunakan API ini adalah sekitar 95%. Jika instalasi gagal, Anda harus menginstal agen secara manual. Untuk informasi lebih lanjut tentang cara menginstal agen CloudMonitor, lihat Menginstal dan menghapus instalasi agen C++.
Contoh
Contoh ini menunjukkan cara memaksa menginstal versi terbaru agen CloudMonitor pada instance ECS i-m5e0k0bexac8tykr****.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cms:InstallMonitoringAgent |
create |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| Force |
boolean |
No |
Menentukan apakah akan memaksa menginstal agen CloudMonitor. Nilai yang valid:
|
true |
| InstanceIds |
array |
No |
ID host Alibaba Cloud. Anda dapat menentukan 1 hingga 10 ID instance. Catatan
Anda harus menentukan salah satu dari |
i-m5e0k0bexac8tykr**** |
|
string |
No |
ID host Alibaba Cloud. Anda dapat menentukan 1 hingga 10 ID instance. Catatan
Anda harus menentukan salah satu dari |
i-m5e0k0bexac8tykr**** |
|
| InstallCommand |
string |
No |
Perintah instalasi. Perintah ini menginstal agen CloudMonitor pada semua host Alibaba Cloud yang dimiliki oleh akun Alibaba Cloud Anda. Nilai yang valid:
Catatan
Jika Anda menetapkan parameter ini, parameter |
onlyInstallNotHasAgent |
Untuk informasi lebih lanjut tentang parameter permintaan umum, lihat Parameter umum.
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
Kode status. Catatan
Nilai 200 menunjukkan bahwa permintaan berhasil. |
200 |
| Message |
string |
Pesan kesalahan. |
The specified resource is not found. |
| RequestId |
string |
ID permintaan. |
0BDAF8A8-04DC-5F0C-90E4-724D42C41945 |
| Success |
boolean |
Menunjukkan apakah operasi berhasil. Nilai yang valid:
|
true |
Contoh
Respons sukses
JSONformat
{
"Code": "200",
"Message": "The specified resource is not found.",
"RequestId": "0BDAF8A8-04DC-5F0C-90E4-724D42C41945",
"Success": true
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | ParameterInvalid | Parameter invalid. | |
| 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. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.