Add zone traffic analytics and Security Events (WAF/rate-limit) commands
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- graphql, typescript
Research direction
Trace the existing cf analytics query, analytics sql, and cf OAuth login entry points first, then compare their handling of zone-scoped analytics and the httpRequestsAdaptiveGroups and firewallEventsAdaptive datasets. Done means discoverable zone traffic and security-events commands, the required analytics OAuth scope, and a clear 4xx for unsupported datasets.
Written by the indexing model from the issue text.
Description
Version: cf 1.0.0-beta.10
Problem: There is no way to answer "is my site OK right now?" from the CLI. Zone HTTP traffic analytics (requests, status codes, cache hit ratio, top countries/paths) and Security Events (WAF / rate-limit / bot blocks) can't be queried.
What I tried:
cf cli searchfor zone traffic, security events, WAF blocks, and country breakdown returns only Zero Trust, Spectrum, Analytics Engine, or Cloudforce One commands.cf analytics query top-n http-requests --zone <zone> ...(andfirewall-events) goes to the account-scoped/analytics/query/<dataset>endpoint. It returns500 art.api.internal_server_errorinstead of an "unknown dataset" error.cf analytics sql post --zone <zone>withhttp_requests/firewall_events(bare, or with anevents.orlogs.prefix) returns "table not found".information_schemaisn't enabled, andanalytics sql introspection getreturns 403 for an account owner logged in throughcfOAuth.
Why it matters: During a traffic spike, the first questions are where the traffic comes from (country, bot vs human, paths) and whether Cloudflare is blocking real users. Right now that needs the dashboard or a separately scoped API token.
Request:
- A zone traffic command, for example
cf zones analytics --since 6h --group-by status|country|path|botClass(backed byhttpRequestsAdaptiveGroups). - A security events command, for example
cf zones security-events list --since 1h --action block,challenge --group-by rule|country|path(backed byfirewallEventsAdaptive). - The
cfOAuth login should include the analytics read scope these commands need. analytics queryshould return a clear 4xx for unsupported datasets instead of a 500.
Related: #171 (generic GraphQL command) would also unblock this, but first-class commands for these two incident-response queries would be much easier to discover.
- Dominant language
- TypeScript
- Stars
- 853
- Forks
- 42
- Avg merge
- 17h 57m
- Merged PRs (30d)
- 146
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cloudflare/cf
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
cloudflare/cf#344 ·
Maintainers usually reply within 1 day
-
upstream
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
cloudflare/cf#262 ·
Maintainers usually reply within 1 day
-
`cf dev` rejects `--port` and `--host` for Vite projects, including the `cf init` templatePossibly taken @jamesopstad claimed this 5 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
cloudflare/cf#223 · 2 assignees ·
Maintainers usually reply within 1 day
-
upstream
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
cloudflare/cf#179 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 58/100
cloudflare/cf#347 ·
Maintainers usually reply within 1 day
Similar issues
-
bug priority: P2
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
wayfinder:task
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
bug customer-reported data-plane question Service Attention Storage
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
Azure/azure-rest-api-specs#47397 · 2 comments ·
Maintainers usually reply within 1 day
-
Claude thinking budget can shrink capped Haiku responses to 2,048 tokensPossibly taken @DavyMassoneto claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
diegosouzapw/OmniRoute#17109 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
paperclipai/paperclip#16785 ·
Maintainers usually reply within 1 day