Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Add zone traffic analytics and Security Events (WAF/rate-limit) commands

Đang mở
#175 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
graphql, typescript
Lĩnh vực
api, cli, data, security

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

upstream

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 search for 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> ... (and firewall-events) goes to the account-scoped /analytics/query/<dataset> endpoint. It returns 500 art.api.internal_server_error instead of an "unknown dataset" error.
  • cf analytics sql post --zone <zone> with http_requests / firewall_events (bare, or with an events. or logs. prefix) returns "table not found". information_schema isn't enabled, and analytics sql introspection get returns 403 for an account owner logged in through cf OAuth.

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:

  1. A zone traffic command, for example cf zones analytics --since 6h --group-by status|country|path|botClass (backed by httpRequestsAdaptiveGroups).
  2. A security events command, for example cf zones security-events list --since 1h --action block,challenge --group-by rule|country|path (backed by firewallEventsAdaptive).
  3. The cf OAuth login should include the analytics read scope these commands need.
  4. analytics query should 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.

Ngôn ngữ chính
TypeScript
Star
853
Fork
42
Merge trung bình
17 giờ 57 phút
Pull request đã merge (30 ngày)
146

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của cloudflare/cf

Tất cả issue của cloudflare/cf

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.