Stack Monitors
Monitor Fastly CDN with Crowswatch
Monitor real-time CDN analytics, cache performance, and origin health across your Fastly services directly from Crowswatch.
What This Integration Provides
- Traffic analytics: requests per second, bandwidth, and response code distribution
- Cache performance: hit rate, miss rate, and cache coverage by service
- Origin health: origin response times and error rates
- Error tracking: 4xx and 5xx rates at the edge and at origin
- Real-time streaming: live metrics via Fastly's real-time stats API
Requirements
| Requirement | Detail |
|---|---|
| Fastly account | Developer or above |
| API token | Scoped to global:read |
| Service ID | One per service you want to monitor |
| Estimated setup time | ~5 minutes |
Step 1: Generate Credentials
Fastly uses API tokens for authentication.
To create a read-only API token:
- Log in to manage.fastly.com
- Go to Account → Personal API Tokens
- Click Create Token
- Enter a name (e.g.
crowswatch-monitor) - Set the Scope to
global:read, which grants read-only access to stats and configuration - Optionally restrict the token to a specific Service and set an Expiration
- Click Create Token
- Copy the token, as it is only shown once
global:read and not global. The read-only scope is sufficient for all monitoring operations.Step 2: Locate Required IDs
Service ID
- Log in to the Fastly dashboard
- Navigate to Deliver → CDN and select your service
- The Service ID appears directly below the service name on the overview page
- It is also visible in the URL when viewing a service
If you have multiple services, you will need a Service ID for each one you want to monitor.
Step 3: Add Credentials to Crowswatch
Navigate to: Crowswatch → Add Service → Fastly
| Field | Value |
|---|---|
| API Token | The token generated in Step 1 |
| Service ID | The Service ID from Step 2 |
To monitor multiple Fastly services, add each one separately in Crowswatch.
Available Metrics
Traffic
- Total requests per second
- Bandwidth served (GB)
- HTTP status code breakdown (2xx, 3xx, 4xx, 5xx)
- Requests by geographic region
Cache Performance
- Cache hit rate (%)
- Cache miss rate (%)
- Hit-for-pass rate
- Pass rate
Origin Health
- Origin fetch count
- Origin response time (ms)
- Origin error rate (%)
- Shield fetches vs origin fetches
Errors
- Edge 4xx rate
- Edge 5xx rate
- Origin 5xx rate
- Uncacheable response count
Connect
- Enter your API Token and Service ID in the Crowswatch form
- Click Verify to confirm the credentials are valid
- Select the metrics you want to track
- Click Connect
Crowswatch will begin polling Fastly's real-time stats API immediately.
Security
- Use
global:readscope. Never useglobal(full write access) for monitoring - Restrict the token to specific services where possible
- Set an expiration date and rotate tokens periodically
- Create a dedicated token for Crowswatch rather than sharing with other tools
Troubleshooting
Authentication error
Verify the token is active and has not expired. Confirm the token has global:read scope, as tokens scoped only to purge operations will not work.
No data appearing
Confirm the Service ID is correct. It should be the ID for an active, live service. Some metrics only populate once the service is receiving traffic.
Service ID not found
The Service ID is case-sensitive. Copy it directly from the dashboard rather than typing it manually. Ensure the token was created under an account that has access to the service.
Partial metrics missing
Real-time stats from Fastly have a short delay. Allow a minute or two before investigating. Some metrics (e.g. shield fetches) are only available if Fastly Shielding is configured on your service.

