攻撃トラフィックの時系列データをクエリします。攻撃リクエストとは、ルールにヒットし、脅威として識別されたリクエストです。
操作説明
Attack traffic refers to requests that hit a rule and are identified as a threat. The following data is excluded:
-
Requests that hit a whitelist rule.
-
Requests that hit a bot rule where the rule action is "Mark for origin fetch".
-
Requests that hit a rule with the action "Dynamic Token", "Slider", "Strict Slider", or "JS Challenge", but are allowed because the user passed the verification.
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
yundun-waf:DescribeSecurityEventTimeSeriesMetric |
get |
*All Resource
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| InstanceId |
string |
必須 |
Web Application Firewall (WAF) インスタンスの ID。 説明
DescribeInstance を呼び出して、WAF インスタンスの ID をクエリできます。 |
waf-cn-tl32ast**** |
| Filter |
object |
必須 |
クエリのフィルター条件。複数のフィルター条件は論理 AND の関係になります。 |
|
| DateRange |
object |
必須 |
The time range to query. |
|
| StartDate |
integer |
必須 |
You can query data from the last 30 days. The start time of the query. This is a UNIX timestamp. Unit: seconds. 説明
The start time must be within the last 30 days. |
1713888000 |
| EndDate |
integer |
必須 |
The end time of the query. This is a UNIX timestamp. Unit: seconds. |
1713888600 |
| Conditions |
array<object> |
任意 |
A list of filter conditions. Each node describes one filter condition. |
|
|
object |
任意 |
A single query condition, which consists of a field name, an operator, and a filter value. For information about the supported field names and operators, see Additional information about request parameters. |
||
| Key |
string |
任意 |
The name of the field to filter. This operation supports all fields. |
matched_host |
| OpValue |
string |
任意 |
The operator. |
eq |
| Values |
any |
任意 |
The filter value. |
test.waf-top |
| Metric |
string |
必須 |
返されるデータの内容を指定します。メトリックごとに異なるデータ内容に対応します。この操作では、以下のメトリックがサポートされています:
|
mitigated_requests |
| RegionId |
string |
任意 |
WAF インスタンスが存在するリージョン。有効な値:
|
cn-hangzhou |
| ResourceManagerResourceGroupId |
string |
任意 |
Alibaba Cloud リソースグループの ID。 |
rg-acfm***q |
演算子の説明。
| 演算子 | 意味 | 説明 |
| all-not-match | いずれの値とも等しくない | フィールド値がデータセット内のいずれの値とも等しくありません。例えば、real_client_ip がコレクション内のいずれの値とも等しくないリクエストをフィルターする場合:{"Key":"real_client_ip","OpValue":"all-not-match","Values":["1.1.1.1","2.2.2.2","3.3.3.3"]} |
| contain | 含む | フィールド値が特定の文字列を含みます。例えば、URL に「test」を含むデータをフィルターする場合:{"Key":"request_path","OpValue":"contain","Values":"test"} |
| eq | 等しい | フィールド値が特定の文字列と等しいです。例えば、URL が「/testcase」と等しいデータをフィルターする場合:{"Key":"request_path","OpValue":"eq","Values":"/testcase"} |
| match-one | 複数の値のいずれかと等しい | フィールド値がデータセット内のいずれかの値と等しいです。例えば、real_client_ip がコレクション内のいずれかの値と等しいリクエストをフィルターする場合:{"Key":"real_client_ip","OpValue":"match-one","Values":["1.1.1.1","2.2.2.2","3.3.3.3"]} |
| ne | 等しくない | フィールド値が特定の文字列と等しくありません。例えば、URL が「/testcase」と等しくない統計をフィルターする場合:{"Key":"request_path","OpValue":"ne","Values":"/testcase"} |
| not-contain | 含まない | フィールド値が特定の文字列を含みません。例えば、URL に「test」を含まないデータをフィルターする場合:{"Key":"request_path","OpValue":"not-contain","Values":"test"} |
| prefix-match | 前方一致 | フィールド値が特定の文字列で始まります。例えば、URL のプレフィックスが「/testcase」であるデータをフィルターする場合:{"Key":"request_path","OpValue":"prefix-match","Values":"/testcase"} |
| suffix-match | 後方一致 | フィールド値が特定の文字列で終わります。例えば、URL のサフィックスが「/testcase」であるデータをフィルターする場合:{"Key":"request_path","OpValue":"suffix-match","Values":"/testcase"} |
フィルター条件でサポートされるキー。
| フィールド名 | 説明 | サポートされる演算子 |
| action | 保護操作。リクエストに対して実行された最終的な操作です。 | ne, eq |
| cluster | 保護クラスター。 | ne, eq, match-one, all-not-match |
| defense_scene | 保護モジュール。リクエストは複数の保護モジュールにヒットする場合があります。このフィールドでフィルターされたリクエストは、他のモジュールにもヒットしている可能性があります。 | ne, eq |
| host | HTTP ヘッダーのホスト。 | contain, not-contain, ne, eq, match-one, all-not-match, prefix-match, suffix-match |
| http_cookie | HTTP ヘッダーの Cookie。 | contain, not-contain, ne, eq, match-one, all-not-match, prefix-match, suffix-match |
| http_user_agent | HTTP ヘッダーの User-Agent。 | contain, not-contain, ne, eq, match-one, all-not-match, prefix-match, suffix-match |
| matched_host | 保護対象オブジェクト。 | ne, eq, match-one, all-not-match |
| real_client_ip | リクエストの送信元 IP アドレス。演算子の後に続くパラメーターは、IP アドレス文字列または IP アドレス文字列のリストである必要があります。CIDR ブロックによるクエリはサポートされていません。 | ne, eq, match-one, all-not-match |
| remote_country_id | HTTP リクエストの送信元 IP アドレスが属する国。 | ne, eq, match-one, all-not-match |
| remote_region_id | HTTP リクエストの送信元 IP アドレスが属するリージョンまたは都市。 | ne, eq, match-one, all-not-match |
| request_method | HTTP リクエストメソッド。 | ne, eq, match-one, all-not-match |
| request_path | HTTP リクエスト URL (クエリ文字列を除く)。 | contain, not-contain, ne, eq, match-one, all-not-match, prefix-match, suffix-match |
| request_traceid | リクエストを識別する一意の ID。 | ne, eq, match-one, all-not-match |
| rule_id | ルール ID。リクエストは複数のルールにヒットする場合があります。このフィールドでフィルターされたリクエストは、他のルールにもヒットしている可能性があります。 | ne, eq |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
The returned data. For a sample format, see the Examples section. |
||
| RequestId |
string |
The request ID. |
D827FCFE-90A7-4330-9326-*****4C7726 |
| SecurityEventTimeSeries |
array<object> |
The returned time series data. The operation can return time series data for multiple values. |
|
|
object |
A single set of time series data. The time series data consists of two arrays: `Timestamps` and `Values`. The `Timestamps` array contains a time series with fixed intervals. The `Values` array contains the statistical count for each interval. The two arrays have the same number of nodes, and their data points have a one-to-one correspondence. |
||
| Metric |
string |
The content of the returned data. This is consistent with the `Metric` request parameter. |
monitored_requests |
| Timestamps |
array |
The time series. Each point represents the start time of a time range. |
|
|
string |
The start time for each data point. This is a UNIX timestamp string. |
[] |
|
| Values |
array |
The data series. Each point represents the statistical count within a specific time range. |
|
|
integer |
The statistical count for the current time range. |
[] |
|
| TimeSeriesMetaData |
object |
The metadata of the returned data. |
|
| DateRange |
object |
The time range used for the query. |
|
| StartDate |
integer |
The beginning of the time range to query. The value is a Unix timestamp. Unit: seconds. This value is the same as the value of StartDate in the request parameters. |
1713888000 |
| EndDate |
integer |
The end of the time range to query. The value is a Unix timestamp. Unit: seconds. This value is the same as the value of EndDate in the request parameters. |
1713888600 |
| AggregateInterval |
string |
The time granularity of each data point in the returned time series data. For example, "15m" indicates that each returned data point represents statistics for a 15-minute interval. For more information about the time granularity of the returned data, see the Time granularity of time series data points section. |
1m |
| Units |
string |
The unit of the returned statistical data. |
requests |
時系列データポイントの時間の粒度。
返されるデータの統計的な時間の粒度は、選択した時間範囲に基づいて異なります。
-
時間範囲が 3 時間未満の場合、データポイントの時間の粒度は 1m (1 分) です。
-
時間範囲が 3 時間以上 6 時間未満の場合、データポイントの時間の粒度は 5m (5 分) です。
-
時間範囲が 6 時間以上 24 時間未満の場合、データポイントの時間の粒度は 15m (15 分) です。
-
時間範囲が 24 時間以上 7 日未満の場合、データポイントの時間の粒度は 1h (1 時間) です。
-
時間範囲が 7 日以上 30 日未満の場合、データポイントの時間の粒度は 1d (1 日) です。
例
成功レスポンス
JSONJSON
{
"RequestId": "D827FCFE-90A7-4330-9326-*****4C7726\n",
"SecurityEventTimeSeries": [
{
"Metric": "monitored_requests",
"Timestamps": [
"[]"
],
"Values": [
0
]
}
],
"TimeSeriesMetaData": {
"DateRange": {
"StartDate": 1713888000,
"EndDate": 1713888600
},
"AggregateInterval": "1m",
"Units": "requests\n"
}
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | Waf.Report.%s | Invalid parameter:%s. | |
| 400 | Waf.Report.InternalError | Server error occurred in report service. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。