Mengkueri jumlah log peringatan yang dihasilkan selama setiap interval dalam suatu periode waktu.
Deskripsi operasi
This topic provides an example on how to query the number of alert logs for Elastic Compute Service (ECS) based on the product dimension.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cms:DescribeAlertLogHistogram |
get |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| StartTime |
integer |
No |
Timestamp awal log peringatan yang akan dikueri. Unit: milliseconds. Catatan
|
1609988009694 |
| EndTime |
integer |
No |
Timestamp akhir log peringatan yang akan dikueri. Unit: milliseconds. Catatan
|
1609989009694 |
| PageNumber |
integer |
No |
Nomor halaman. Nilai default: 1. |
1 |
| PageSize |
integer |
No |
Jumlah entri per halaman. Nilai default: 10. |
10 |
| SearchKey |
string |
No |
Kata kunci yang digunakan untuk mengkueri log peringatan. |
alert |
| GroupId |
string |
No |
ID kelompok aplikasi. |
7301**** |
| Product |
string |
No |
Singkatan nama layanan Alibaba Cloud. |
ECS |
| Namespace |
string |
No |
Namespace layanan Alibaba Cloud. Catatan
Untuk informasi selengkapnya tentang namespace berbagai layanan cloud, lihat Appendix 1: Metrics. |
acs_ecs_dashboard |
| Level |
string |
No |
Tingkat keparahan dan metode notifikasi peringatan. Nilai valid:
|
P4 |
| SendStatus |
string |
No |
Status peringatan. Nilai valid:
Jika nilai parameter SendStatus adalah 0, nilai P4 pada parameter Level Pemberitahuan peringatan yang dipicu dan nilai OK Pemberitahuan peringatan yang dihapus. |
0 |
| ContactGroup |
string |
No |
Kelompok kontak peringatan. |
ECS_Group |
| RuleName |
string |
No |
Nama aturan peringatan. |
test123 |
| MetricName |
string |
No |
Nama metrik. Catatan
Untuk informasi selengkapnya tentang metrik berbagai layanan cloud, lihat Appendix 1: Metrics. |
cpu_total |
| LastMin |
string |
No |
Periode statistik log peringatan. Unit: minutes. |
360 |
| GroupBy |
string |
No |
Dimensi yang digunakan untuk mengagregasi data. Parameter ini setara dengan klausa GROUP BY dalam SQL. Nilai valid:
|
product |
| SourceType |
string |
No |
Parameter ini tidak digunakan lagi. |
无 |
| EventType |
string |
No |
Tipe event peringatan. Nilai valid:
|
RESOLVED |
| RuleId |
string |
No |
ID aturan peringatan. Untuk informasi selengkapnya tentang cara mendapatkan ID aturan peringatan, lihat DescribeMetricRuleList. |
ae06917_75a8c43178ab66**** |
Untuk informasi selengkapnya tentang parameter permintaan umum, lihat Common parameters.
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
None. |
||
| Code |
string |
The response code. Catatan
The status code 200 indicates that the request was successful. |
200 |
| Message |
string |
The error message. |
The specified resource is not found. |
| RequestId |
string |
The request ID. |
1C4A3709-BF52-42EE-87B5-7435F0929585 |
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
true |
| AlertLogHistogramList |
array<object> |
The number of alert logs that were generated during each interval of a time period. |
|
|
object |
|||
| From |
integer |
The start timestamp of the queried alert logs. Unit: seconds. |
1610074791 |
| To |
integer |
The end timestamp of the queried alert logs. Unit: seconds. |
1610074800 |
| Count |
integer |
The number of alert logs. |
20 |
Contoh
Respons sukses
JSONformat
{
"Code": "200",
"Message": "The specified resource is not found.",
"RequestId": "1C4A3709-BF52-42EE-87B5-7435F0929585",
"Success": true,
"AlertLogHistogramList": [
{
"From": 1610074791,
"To": 1610074800,
"Count": 20
}
]
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | ParameterInvalid | %s | |
| 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. | |
| 409 | ResourceConflict | Concurrent modification of resources. | |
| 409 | ResourceExist | Resources already exist. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.