Mengkueri statistik top N untuk trafik serangan. Trafik serangan diagregasikan berdasarkan dimensi tertentu, diurutkan, dan hasil top N dikembalikan.
Deskripsi operasi
Attack traffic refers to requests that hit a rule and are identified as a threat. The following types of requests are not included in the statistics:
-
Requests that hit a whitelist rule.
-
Requests that hit a bot rule with the action set to Tag.
-
Requests that hit a rule with the action set to Dynamic Token, Slider, Strict Slider, or JS Challenge, and are allowed after the user passes verification.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-waf:DescribeSecurityEventTopNMetric |
get |
*All Resource
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
ID instans WAF. Catatan
Panggil operasi DescribeInstance untuk mengkueri ID instans WAF. |
waf_cdnsdf3**** |
| Filter |
object |
Yes |
Kondisi filter untuk kueri. Operator logika AND digunakan di antara beberapa kondisi filter. |
|
| DateRange |
object |
Yes |
The time range to query. |
|
| StartDate |
integer |
Yes |
The start of the time range to query. The value is a UNIX timestamp. Unit: seconds. You can query data within the last 30 days. Catatan
The start time must be within the last 30 days. |
1713888000 |
| EndDate |
integer |
Yes |
The end of the time range to query. The value is a UNIX timestamp. Unit: seconds. |
1713888600 |
| Conditions |
array<object> |
No |
A list of filter conditions. Each object in the array represents a filter condition. |
|
|
object |
No |
The configuration of a single query condition. A query condition consists of a field name, an operator, and a filter value. For more information about the supported field names and operators, see the Additional information about request parameters section. |
||
| Key |
string |
No |
The field to filter by. This operation supports all fields. |
matched_host |
| OpValue |
string |
No |
The operator. |
eq |
| Values |
any |
No |
The filter value. |
test.waf-top |
| Limit |
integer |
Yes |
Jumlah maksimum entri yang dikembalikan. Entri diurutkan dalam urutan Pesanan menurun. Nilai maksimum: 10. |
10 |
| Metric |
string |
Yes |
Menentukan konten data yang dikembalikan. Data deret waktu yang berbeda berkaitan dengan konten data yang berbeda. Operasi ini mendukung data deret waktu berikut: Catatan
Untuk Definisi permintaan serangan, lihat bagian Description di topik ini. Deskripsi berikut menggunakan definisi ini.
|
real_client_ip |
| RegionId |
string |
No |
Wilayah tempat instans WAF berada. Nilai valid:
|
cn-hangzhou |
| ResourceManagerResourceGroupId |
string |
No |
ID kelompok sumber daya. |
rg-acfm***q |
Deskripsi Operator.
| Operator | Arti | Deskripsi |
| all-not-match | Tidak sama dengan nilai apa pun | Nilai bidang tidak sama dengan nilai apa pun di dataset. Misalnya, untuk memfilter nilai real_client_ip yang tidak sama dengan nilai apa pun di koleksi:{"Key":"real_client_ip","OpValue":"all-not-match","Values":["1.1.1.1","2.2.2.2","3.3.3.3"]} |
| contain | Berisi | Nilai bidang berisi string tertentu. Misalnya, untuk memfilter data di mana URL berisi "test":{"Key":"request_path","OpValue":"contain","Values":"test"} |
| eq | Sama dengan | Nilai bidang sama dengan string tertentu. Misalnya, untuk memfilter data di mana URL adalah "/testcase":{"Key":"request_path","OpValue":"eq","Values":"/testcase"} |
| match-one | Sama dengan salah satu dari beberapa nilai | Nilai bidang sama dengan nilai apa pun di dataset. Misalnya, untuk memfilter nilai real_client_ip yang sama dengan nilai apa pun di koleksi:{"Key":"real_client_ip","OpValue":"match-one","Values":["1.1.1.1","2.2.2.2","3.3.3.3"]} |
| ne | Tidak sama dengan | Nilai bidang tidak sama dengan string tertentu. Misalnya, untuk memfilter statistik di mana URL bukan "/testcase":{"Key":"request_path","OpValue":"ne","Values":"/testcase"} |
| not-contain | Tidak berisi | Nilai bidang tidak berisi string tertentu. Misalnya, untuk memfilter data di mana URL tidak berisi "test":{"Key":"request_path","OpValue":"not-contain","Values":"test"} |
| prefix-match | Pencocokan awalan | Nilai bidang dimulai dengan string tertentu. Misalnya, untuk memfilter data di mana awalan URL adalah "/testcase":{"Key":"request_path","OpValue":"prefix-match","Values":"/testcase"} |
| suffix-match | Pencocokan akhiran | Nilai bidang diakhiri dengan string tertentu. Misalnya, untuk memfilter data di mana akhiran URL adalah "/testcase":{"Key":"request_path","OpValue":"suffix-match","Values":"/testcase"} |
Kunci yang didukung untuk kondisi filter.
| Nama bidang | Deskripsi | Operator yang didukung |
| action | Aksi proteksi. Ini adalah aksi akhir yang diambil pada permintaan. | ne, eq |
| cluster | Kluster proteksi. | ne, eq, match-one, all-not-match |
| defense_scene | Modul proteksi. Permintaan dapat terkena beberapa modul proteksi. Permintaan yang difilter oleh bidang ini juga dapat terkena modul lain. | ne, eq |
| host | Header host dari permintaan HTTP. | contain, not-contain, ne, eq, match-one, all-not-match, prefix-match, suffix-match |
| http_cookie | Header cookie dari permintaan HTTP. | contain, not-contain, ne, eq, match-one, all-not-match, prefix-match, suffix-match |
| http_user_agent | Header User-Agent dari permintaan HTTP. | contain, not-contain, ne, eq, match-one, all-not-match, prefix-match, suffix-match |
| matched_host | Objek terproteksi. | ne, eq, match-one, all-not-match |
| real_client_ip | Alamat IP sumber dari permintaan. Nilai dapat berupa string alamat IP atau daftar string alamat IP. Blok CIDR tidak didukung. | ne, eq, match-one, all-not-match |
| remote_country_id | Negara asal alamat IP sumber dari permintaan HTTP. | ne, eq, match-one, all-not-match |
| remote_region_id | Provinsi atau kota asal alamat IP sumber dari permintaan HTTP (Wilayah). | ne, eq, match-one, all-not-match |
| request_method | Metode permintaan HTTP. | ne, eq, match-one, all-not-match |
| request_path | URL permintaan HTTP, tidak termasuk string kueri. | contain, not-contain, ne, eq, match-one, all-not-match, prefix-match, suffix-match |
| request_traceid | ID unik permintaan. | ne, eq, match-one, all-not-match |
| rule_id | ID aturan. Permintaan dapat terkena beberapa aturan. Permintaan yang difilter oleh bidang ini juga dapat terkena aturan lain. | ne, eq |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
The data returned. For a sample format, see the Examples section. |
||
| RequestId |
string |
The request ID. |
D827FCFE-90A7-4330-9326-*****B4C7726 |
| SecurityEventTopNValues |
array<object> |
An array of the top N statistics. |
|
|
object |
Each object in the array represents one top statistic. |
||
| Name |
string |
The value of a field. The meaning of this parameter varies based on the specified `Metric`. |
10000 |
| Attribute |
string |
Additional information, such as the protection module to which a rule ID belongs. |
waf_base |
| Value |
integer |
The statistical count used for top N sorting. |
1111 |
| TopNMetaData |
object |
The metadata of the returned data. |
|
| DateRange |
object |
The time range used for the query. |
|
| StartDate |
integer |
The start of the time range that was queried. The value is a UNIX timestamp. Unit: seconds. This value is the same as the `StartDate` request parameter. |
1713888000 |
| EndDate |
integer |
The end of the time range that was queried. The value is a UNIX timestamp. Unit: seconds. This value is the same as the `EndDate` request parameter. |
1713888600 |
| Units |
string |
The unit of the returned statistics. |
requests |
Contoh
Respons sukses
JSONformat
{
"RequestId": "D827FCFE-90A7-4330-9326-*****B4C7726\n",
"SecurityEventTopNValues": [
{
"Name": "10000",
"Attribute": "waf_base\n",
"Value": 1111
}
],
"TopNMetaData": {
"DateRange": {
"StartDate": 1713888000,
"EndDate": 1713888600
},
"Units": "requests\n"
}
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Waf.Report.%s | Invalid parameter:%s. | Invalid parameter:%s |
| 400 | Waf.Report.InternalError | Server error occurred in report service. | Report Service Internal Error |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.