Cloudflare

Stack Monitors

Monitor Cloudflare with Crowswatch

Monitor HTTP traffic, firewall events, DNS analytics, and performance metrics across your Cloudflare zones directly from Crowswatch.

What This Integration Provides

  • Traffic analytics: requests, bandwidth, unique visitors, and response codes across your zones
  • Firewall & WAF events: blocked requests, threat types, and rule matches
  • DNS analytics: query volume, response types, and propagation health
  • Cache performance: hit rate, miss rate, and bandwidth saved
  • Worker & Pages metrics: invocation counts, CPU time, and error rates
  • SSL/TLS status: certificate expiry and coverage across zones
  • Rate limiting: triggered rules and mitigation counts
  • Health checks: origin availability and pool status

Requirements

RequirementDetail
Cloudflare accountFree plan or above
API tokenScoped to the zones you want to monitor
Zone IDOne per zone (found in the Cloudflare dashboard)
Account IDFound in the Cloudflare dashboard sidebar
Estimated setup time~5 minutes

Step 1: Generate Credentials

Cloudflare uses API tokens (preferred) or a global API key.

To create an API token:

  1. Log in to the Cloudflare dashboard
  2. Go to My Profile → API Tokens
  3. Click Create Token
  4. Use the Read all resources template, or create a custom token with these permissions:
    ResourcePermission
    Zone: AnalyticsRead
    Zone: Firewall ServicesRead
    Zone: DNSRead
    Account: Account AnalyticsRead
  5. Under Zone Resources, select the specific zones or choose All zones
  6. Set an optional TTL for the token
  7. Click Continue to summary → Create Token
  8. Copy the token, as it will only be shown once
Use a dedicated token scoped to read-only permissions. Never use your Global API Key.

Step 2: Locate Required IDs

Zone ID

  1. Open the Cloudflare dashboard and select the domain you want to monitor
  2. On the Overview page, scroll to the API section in the right-hand sidebar
  3. Copy the Zone ID

Account ID

  1. Look at the URL in the Cloudflare dashboard: https://dash.cloudflare.com/<ACCOUNT_ID>/...
  2. The Account ID is also visible in the Workers & Pages section sidebar

Step 3: Add Credentials to Crowswatch

Navigate to: Crowswatch → Add Service → Cloudflare

FieldValue
API TokenThe token generated in Step 1
Account IDYour Cloudflare Account ID
Zone IDThe Zone ID for the domain to monitor

You can add multiple zones by repeating this process for each domain.

Available Metrics

Traffic

  • Total requests (by zone, over time)
  • Bandwidth served (GB)
  • Unique visitors
  • HTTP response code breakdown (2xx, 3xx, 4xx, 5xx)
  • Requests by country

Security Events

  • Firewall rule triggers
  • WAF rule matches
  • Bot score distribution
  • Blocked vs challenged vs allowed requests
  • Rate limit triggers

Cache Performance

  • Cache hit rate (%)
  • Cached vs uncached bandwidth
  • Cache status breakdown

DNS Analytics

  • Total DNS queries
  • Query type breakdown (A, AAAA, CNAME, MX, TXT)
  • NXDOMAIN rate
  • Response time

Workers & Pages

  • Worker invocations
  • CPU time (ms)
  • Error rate
  • Script-level breakdown

SSL / TLS

  • Certificate expiry dates
  • Coverage per zone
  • TLS version distribution

Health Checks

  • Origin availability (up/degraded/down)
  • Pool health status
  • Failover events

Connect

  1. Enter your API Token, Account ID, and Zone ID in the Crowswatch form
  2. Click Verify to confirm the credentials are valid
  3. Select the metrics you want to track
  4. Click Connect

Crowswatch will begin pulling data immediately. The dashboard will populate within the first polling interval.

Security

  • Use a scoped API token, not a Global API Key
  • Grant only the permissions listed above. No write access is required
  • Set a TTL on the token and rotate it periodically
  • Create one token per environment (staging, production) for auditability
  • Do not share tokens across integrations

Troubleshooting

No data appearing after connecting

Verify the API token has the correct permissions (Zone Analytics: Read). Confirm the Zone ID matches the domain you intend to monitor. Check that the token has not expired.

Authentication error

Ensure you copied the full token. Cloudflare tokens are not recoverable after creation. Try generating a new token if the original cannot be verified.

Partial metrics missing

Some metrics (e.g. Workers) require specific permissions in the token scope. Ensure the token includes Account Analytics: Read for account-level data.

Zone ID not accepted

Confirm the Zone ID is for a zone your account controls. The Zone ID must correspond to the account associated with the API token.