Mengkueri statistik deret waktu dari seluruh trafik, termasuk permintaan berbahaya dan permintaan layanan normal.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-waf:DescribeNetworkFlowTimeSeriesMetric |
get |
*全部资源
|
|
None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
ID instans WAF. Catatan
Panggil DescribeInstance untuk memperoleh ID instans. |
waf_cdnsdf3**** |
| Filter |
object |
Yes |
Kondisi filter untuk kueri. Beberapa kondisi filter memiliki hubungan logis AND. |
|
| DateRange |
object |
Yes |
The time range to query. |
|
| StartDate |
integer |
Yes |
The start of the time range to query, in UNIX timestamp format. Unit: seconds. The query time range cannot exceed 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. This value is a UNIX timestamp. Unit: seconds. |
1713888600 |
| Conditions |
array<object> |
No |
A list of filter conditions. Each item describes a filter condition. |
|
|
object |
No |
The configuration of a single filter condition. A filter condition consists of a field name, an operator, and a filter value. For more information about the supported field names and operators, see Additional information about request parameters. |
||
| Key |
string |
No |
The field to use for filtering. This parameter supports the following fields:
|
matched_host |
| OpValue |
string |
No |
The operator. |
eq |
| Values |
any |
No |
The filter value. |
test.waf-top |
| Metric |
string |
Yes |
Data deret waktu yang akan dikueri. Data deret waktu yang berbeda mengembalikan data yang berbeda. Nilai valid:
|
total_requests |
| RegionId |
string |
No |
Wilayah instans WAF. Nilai valid:
|
cn-hangzhou |
| ResourceManagerResourceGroupId |
string |
No |
ID kelompok sumber daya Alibaba Cloud. |
rg-acfm***q |
Deskripsi operator.
| Operator | Arti | Deskripsi |
| all-not-match | Tidak sama dengan nilai mana pun | Nilai bidang tidak sama dengan nilai mana pun dalam koleksi. Misalnya, untuk memfilter permintaan ketika real_client_ip tidak sama dengan nilai mana pun dalam koleksi:{"Key":"real_client_ip","OpValue":"all-not-match","Values":["1.1.1.1","2.2.2.2","3.3.3.3"]} |
| eq | Sama dengan | Nilai bidang sama dengan string. Misalnya, untuk memfilter statistik permintaan ketika URL sama dengan "/testcase":{"Key":"request_path","OpValue":"eq","Values":"/testcase"} |
| match-one | Sama dengan salah satu nilai | Nilai bidang sama dengan nilai mana pun dalam koleksi. Misalnya, untuk memfilter permintaan ketika real_Klien_ip sama dengan nilai mana pun dalam 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. Misalnya, untuk memfilter statistik permintaan ketika URL tidak sama dengan "/testcase":{"Key":"request_path","OpValue":"ne","Values":"/testcase"} |
Kunci yang didukung untuk kondisi filter.
| Nama bidang | Deskripsi | Operator yang didukung |
| cluster | Kluster perlindungan. | ne, eq, match-one, all-not-match |
| matched_host | Objek yang dilindungi. | ne, eq, match-one, all-not-match |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
The returned data. For a sample format, see the Examples section. |
||
| RequestId |
string |
The request ID. |
D827FCFE-90A7-4330-9326-D33C8B4***** |
| NetworkFlowTimeSeries |
array<object> |
The time series data. Multiple data series can be returned. |
|
|
object |
A single time series. The time series data consists of two arrays: Timestamps and Values. The Timestamps array contains a sequence of timestamps at fixed intervals. The Values array contains the statistical count for each interval. The two arrays have the same number of data points, and the data points correspond to each other. |
||
| Metric |
string |
The metric name. This value is the same as the Metric request parameter. |
total_requests |
| Timestamps |
array |
The timestamps. Each value represents the start of a time interval. |
|
|
string |
The start time of each data point. This value is a UNIX timestamp string. |
[] |
|
| Values |
array |
The metric values. Each value represents the count within the corresponding time interval. |
|
|
integer |
The statistical count for the current time range. |
[] |
|
| TimeSeriesMetaData |
object |
The metadata of the returned data. |
|
| DateRange |
object |
The time range that was queried. |
|
| StartDate |
integer |
The start of the time range that was queried. This 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. This value is a UNIX timestamp. Unit: seconds. This value is the same as the EndDate request parameter. |
1713888600 |
| AggregateInterval |
string |
The time granularity of each data point in the returned time series. For example, "15m" indicates that each data point represents statistics for a 15-minute interval. For more information about the time granularity, see the Time granularity of data points section. |
1m |
| Units |
string |
The unit of the returned data. Default value: requests. |
requests |
Granularitas waktu titik data.
Granularitas waktu data yang dikembalikan bervariasi berdasarkan rentang waktu yang ditentukan.
-
Jika rentang waktu kurang dari 3 jam, granularitas waktunya adalah 1m (1 menit).
-
Jika rentang waktu 3 jam atau lebih dan kurang dari 6 jam, granularitas waktunya adalah 5m (5 menit).
-
Jika rentang waktu 6 jam atau lebih dan kurang dari 24 jam, granularitas waktunya adalah 15m (15 menit).
-
Jika rentang waktu 24 jam atau lebih dan kurang dari 7 hari, granularitas waktunya adalah 1h (1 jam).
-
Jika rentang waktu 7 hari atau lebih dan kurang dari 30 hari, granularitas waktunya adalah 1d (1 hari).
Contoh
Respons sukses
JSONformat
{
"RequestId": "D827FCFE-90A7-4330-9326-D33C8B4*****",
"NetworkFlowTimeSeries": [
{
"Metric": "total_requests",
"Timestamps": [
"[]"
],
"Values": [
0
]
}
],
"TimeSeriesMetaData": {
"DateRange": {
"StartDate": 1713888000,
"EndDate": 1713888600
},
"AggregateInterval": "1m",
"Units": "requests"
}
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Waf.Report.%s | Invalid parameter:%s. | |
| 400 | Waf.Report.InternalError | Server error occurred in report service. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.