2222 SUM (EdgeResponseBytes) / (1024 .0 * 1024 .0 ) AS total_data_transfer_mb
2323FROM
2424 http_requests
25- WHERE
26- EdgeEndTimestamp >= ' 2026-02-01T00:00:00Z'
27- AND EdgeEndTimestamp <= ' 2026-02-08T23:59:59Z'
25+ WHERE {{ timeFilter }}
2826```
2927
3028## Review distribution of security actions
@@ -50,13 +48,22 @@ Identify the top client IP addresses and request URIs that triggered managed, Ja
5048SELECT
5149 ClientIP,
5250 ClientRequestURI,
53- SecurityAction ,
51+ SecurityActions ,
5452 COUNT (* ) AS Count
5553FROM http_requests
56- WHERE SecurityAction IN (' managed_challenge' , ' jschallenge' , ' challenge' )
57- GROUP BY ClientIP, ClientRequestURI, SecurityAction
54+ WHERE {{ timeFilter }}
55+ AND (
56+ ARRAY_CONTAINS(SecurityActions, ' challenge' )
57+ OR ARRAY_CONTAINS(SecurityActions, ' managedChallenge' )
58+ OR ARRAY_CONTAINS(SecurityActions, ' jsChallenge' )
59+ OR ARRAY_CONTAINS(SecurityActions, ' challengeSolved' )
60+ )
61+ GROUP BY
62+ ClientIP,
63+ ClientRequestURI,
64+ SecurityActions
5865ORDER BY Count DESC
59- LIMIT 10
66+ LIMIT 20
6067```
6168
6269## Find highest bandwidth consumers by URI
6875 ClientRequestURI,
6976 SUM (EdgeResponseBytes) / (1024 * 1024 ) AS MegabytesTransferred
7077FROM http_requests
78+ WHERE {{ timeFilter }}
7179GROUP BY ClientRequestURI
7280ORDER BY MegabytesTransferred DESC
7381LIMIT 10
@@ -85,10 +93,7 @@ SELECT
8593 MIN (ClientTCPRttMs) AS min_rtt,
8694 MAX (ClientTCPRttMs) AS max_rtt
8795FROM http_requests
88- WHERE date = ' 2026-03-04'
89- AND EdgeEndTimestamp >= ' 2026-03-04T00:00:00Z'
90- AND EdgeEndTimestamp <= ' 2026-03-04T23:59:59Z'
91- AND ClientTCPRttMs > 0
96+ WHERE {{ timeFilter }}
9297GROUP BY ClientCountry
9398ORDER BY avg_rtt DESC
9499LIMIT 20
@@ -105,9 +110,7 @@ SELECT
105110 SUM (EdgeResponseBytes) AS total_bytes,
106111 AVG (EdgeTimeToFirstByteMs) AS avg_ttfb
107112FROM http_requests
108- WHERE date = ' 2026-03-04'
109- AND EdgeEndTimestamp >= ' 2026-03-04T00:00:00Z'
110- AND EdgeEndTimestamp <= ' 2026-03-04T23:59:59Z'
113+ WHERE {{ timeFilter }}
111114GROUP BY CacheCacheStatus
112115ORDER BY requests DESC
113116```
@@ -123,10 +126,7 @@ SELECT
123126 COUNT (* ) AS requests,
124127 SUM (CASE WHEN EdgeResponseStatus >= 500 THEN 1 ELSE 0 END) AS errors
125128FROM http_requests
126- WHERE date = ' 2026-03-04'
127- AND EdgeEndTimestamp >= ' 2026-03-04T00:00:00Z'
128- AND EdgeEndTimestamp <= ' 2026-03-04T23:59:59Z'
129- GROUP BY ClientRequestPath
129+ WHERE {{ timeFilter }}
130130ORDER BY avg_ttfb DESC
131131LIMIT 10
132132```
0 commit comments