-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: ipv6 regexp * chore: eof/eol cleanup * doc: correct link
- Loading branch information
1 parent
657326c
commit 1e90035
Showing
6 changed files
with
9 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
athena_queries/count_requests_grouped_by_ip_tenant_endpoint.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
/* | ||
This query count requests grouped by the ip, terminating rule, action, endpoint and tenant | ||
*/ | ||
WITH test_dataset AS | ||
WITH test_dataset AS | ||
(SELECT httprequest.clientip, terminatingruleid, action, httprequest.uri, header FROM waf_logs | ||
CROSS JOIN UNNEST(httprequest.headers) AS t(header) where (action='BLOCK') and (terminatingruleid='Group_1-CH')) | ||
SELECT COUNT(*) as count, clientip, terminatingruleid, action, uri, header.value as tenant | ||
FROM test_dataset | ||
FROM test_dataset | ||
WHERE LOWER(header.name)='host' | ||
GROUP BY clientip, terminatingruleid, action, uri, header.value | ||
ORDER BY count DESC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
This query gets all the blocked requests for a given IP (works for both IPV4 and IPV6) in a give time range | ||
*/ | ||
SELECT * | ||
SELECT * | ||
FROM waf_logs | ||
WHERE httprequest.clientip='2a02:121e:7823:0:bc4c:e549:9ae0:c93a' AND "date" >= '2022/11/03' AND "date" < '2022/11/04' AND ("action" LIKE 'BLOCK') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters