Fastly

Fastly dashboard showing cache hit ratio, success rate, and other metrics

Overview

Connect Fastly to Datadog to view key Fastly metrics (for example, cache coverage and header size) in context with the rest of your Datadog metrics.

The integration includes out-of-the-box monitors and dashboard that enable you to view metrics in aggregate, pivot between Fastly metrics and related logs, and create monitors that alert you when a metric passes a user-defined threshold or behaves anomalously.

Setup

Installation

No installation steps required.

Configuration

Metric collection

Create a Read-only access API token on Fastly’s token management page, get your Service ID from the Dashboard and enter them in the Fastly integration tile.

The ServiceID is the alphanumerical code, for example: 5VqE6MOOy1QFJbgmCK41pY (example from the Fastly API documentation).

If you are using multiple Service IDs from one account, enter an API token on each line.

The account name is a way for you to organize your accounts, and is not used as part of the data ingestion process.

Log collection

Log collection is not supported for this site.

Configure the Datadog endpoint to forward Fastly logs to Datadog. You can choose the Datadog or Datadog (via Syslog) endpoint. The Datadog endpoint is recommended for more reliable delivery of logs over Syslog.

Select the logging endpoint
  1. Log in to the Fastly web interface and click Configure link.
  2. From the Service menu, select the appropriate service.
  3. Click the Configuration button and then select Clone active. The Domains page appears.
  4. Click the Logging link. The logging endpoints page appears. Click Create Endpoint under Datadog or the Datadog (with Syslog) options.
  1. Give a name to the endpoint, for example: Datadog.
  2. Configure the log format. By default, the recommended Datadog-Fastly log format is already provided and can be customized.
  3. Select your region to match your Datadog account region:
  4. Add your Datadog API key.
  5. Click Create at the bottom.
  6. Click Activate at the top right to activate the new configuration. After a few minutes, logs should begin flowing into your account.
Configure the Syslog endpoint
  1. Give a name to the endpoint, for example: Datadog.

  2. Configure the log format to include the recommended Datadog-Fastly log format with your Datadog API key at the beginning. See Using the JSON logging format in the Fastly documentation for an example.

    <DATADOG_API_KEY> <DATADOG_FASTLY_LOG_FORMAT>
    

    Note: Your Datadog API key MUST be in front of the Datadog-Fastly log format for your logs to display in Datadog. See Useful variables to log for more details.

  3. Set Syslog Address to:

  4. Set Port to:

  5. Set TLS to yes

  6. Set TLS Hostname to:

  7. In the advanced option section, select Blank as log line format

  8. Finally, save the endpoint and deploy the service. See the logs in your Datadog Logs Explorer.

Data Collected

Metrics

fastly.attack_synth
(gauge)
fastly.bandwidth
(gauge)
Bandwidth sent.
Shown as byte
fastly.body_size
(gauge)
Request body bandwidth sent.
Shown as byte
fastly.errors
(gauge)
Number of Errors.
Shown as request
fastly.header_size
(gauge)
Request header bandwidth sent.
Shown as byte
fastly.hit_ratio
(gauge)
Ratio of cache hits to cache misses.
Shown as percent
fastly.hits
(gauge)
Number of cache hits.
Shown as request
fastly.hits_time
(gauge)
Amount of time spent processing cache hits.
Shown as second
fastly.miss
(gauge)
Number of cache misses.
Shown as request
fastly.miss_time
(gauge)
Amount of time spent processing cache misses.
Shown as second
fastly.pass
(gauge)
Number of requests passed through the CDN without being cached.
Shown as request
fastly.pipe
(gauge)
Number of pipe operations performed.
Shown as operation
fastly.requests
(gauge)
Number of Requests Processed.
Shown as request
fastly.status_1xx
(gauge)
Number of responses sent with an Informational status code.
Shown as response
fastly.status_200
(gauge)
Number of responses sent with status code 200 (Success).
Shown as response
fastly.status_204
(gauge)
Number of responses sent with status code 204 (No Content).
Shown as response
fastly.status_2xx
(gauge)
Number of responses sent with a Success status code.
Shown as response
fastly.status_301
(gauge)
Number of responses sent with status code 301 (Moved Permanently).
Shown as response
fastly.status_302
(gauge)
Number of responses sent with status code 302 (Found).
Shown as response
fastly.status_304
(gauge)
Number of responses sent with status code 304 (Not Modified).
Shown as response
fastly.status_3xx
(gauge)
Number of responses sent with a Redirection status code.
Shown as response
fastly.status_4xx
(gauge)
Number of responses sent with a Client Error status code.
Shown as response
fastly.status_503
(gauge)
Number of responses sent with status code 503 (Service Unavailable).
Shown as response
fastly.status_5xx
(gauge)
Number of responses sent with a Server Error status code.
Shown as response
fastly.synth
(gauge)
fastly.uncacheable
(gauge)
Number of requests that were denoted uncachable.
Shown as request
fastly.pci
(gauge)
Number of responses that have the PCI flag turned on
Shown as response
fastly.tls
(gauge)
Number of requests that were received over TLS
Shown as request
fastly.log
(gauge)
Number of log lines sent
fastly.ipv6
(gauge)
Number of requests that were received over IPv6
Shown as request
fastly.otfp
(gauge)
Number of responses that came from the Fastly On-the-Fly-Packager for On Demand Streaming service for Video-on-Demand
Shown as response
fastly.video
(gauge)
Number of responses with video segment or video manifest MIME type
Shown as response
fastly.http2
(gauge)
Number of requests that were received over HTTP2
Shown as request
fastly.shield
(gauge)
Number of requests from edge to the shield POP.
Shown as request
fastly.imgopto
(gauge)
Number of responses that came from the Fastly Image Optimizer service
Shown as response
fastly.blacklist
(gauge)
fastly.orig_req_body_size
(gauge)
Total body bytes sent to origin
Shown as byte
fastly.orig_req_header_size
(gauge)
Total header bytes sent to origin
Shown as byte
fastly.orig_resp_body_size
(gauge)
Total body bytes sent from origin
Shown as byte
fastly.orig_resp_header_size
(gauge)
Total header bytes sent from origin
Shown as byte
fastly.tls_v10
(gauge)
Number of requests received over TLS 1.0
Shown as request
fastly.tls_v11
(gauge)
Number of requests received over TLS 1.1
Shown as request
fastly.tls_v12
(gauge)
Number of requests received over TLS 1.2
Shown as request
fastly.tls_v13
(gauge)
Number of requests received over TLS 1.3
Shown as request
fastly.req_body_bytes
(gauge)
Total body bytes received
Shown as byte
fastly.req_header_bytes
(gauge)
Total header bytes received
Shown as byte
fastly.resp_body_bytes
(gauge)
Total body bytes delivered
Shown as byte
fastly.resp_header_bytes
(gauge)
Total header bytes delivered.
Shown as byte
fastly.object_size_1k
(gauge)
Number of objects served that were under 1KB in size
Shown as object
fastly.object_size_10k
(gauge)
Number of objects served that were between 1KB and 10KB in size
Shown as object
fastly.object_size_100k
(gauge)
Number of objects served that were between 10KB and 100KB in size
Shown as object
fastly.object_size_1m
(gauge)
Number of objects served that were between 100KB and 1MB in size
Shown as object
fastly.object_size_10m
(gauge)
Number of objects served that were between 1MB and 10MB in size
Shown as object
fastly.object_size_100m
(gauge)
Number of objects served that were between 10MB and 100MB in size
Shown as object
fastly.object_size_1g
(gauge)
Number of objects served that were between 100MB and 1GB in size
Shown as object
fastly.pass_time
(gauge)
Amount of time spent processing cache passes
Shown as second
fastly.status_400
(gauge)
Number of responses sent with status code 400 (Bad Request)
Shown as response
fastly.status_401
(gauge)
Number of responses sent with status code 401 (Unauthorized)
Shown as response
fastly.status_403
(gauge)
Number of responses sent with status code 403 (Forbidden)
Shown as response
fastly.status_404
(gauge)
Number of responses sent with status code 404 (Not Found)
Shown as response
fastly.status_416
(gauge)
Number of responses sent with status code 416 (Range Not Satisfiable)
Shown as response
fastly.status_500
(gauge)
Number of responses sent with status code 500 (Internal Server Error)
Shown as response
fastly.status_501
(gauge)
Number of responses sent with status code 501 (Not Implemented)
Shown as response
fastly.status_502
(gauge)
Number of responses sent with status code 502 (Bad Gateway)
Shown as response
fastly.status_504
(gauge)
Number of responses sent with status code 504 (Gateway Timeout)
Shown as response
fastly.status_505
(gauge)
Number of responses sent with status code 505 (HTTP Version Not Supported)
Shown as response
fastly.restarts
(gauge)
Number of restarts performed
fastly.shield_resp_body_bytes
(gauge)
Total body bytes delivered via a shield
Shown as byte
fastly.shield_resp_header_bytes
(gauge)
Total header bytes delivered via a shield
Shown as byte
fastly.otfp_resp_body_bytes
(gauge)
Total body bytes delivered from the Fastly On-the-Fly Packager for On Demand Streaming service for video-on-demand
Shown as byte
fastly.otfp_resp_header_bytes
(gauge)
Total header bytes delivered from the Fastly On-the-Fly Packager for On Demand Streaming service for video-on-demand
Shown as byte
fastly.otfp_shield_resp_body_bytes
(gauge)
Total body bytes delivered via a shield for the Fastly On-the-Fly Packager for On Demand Streaming service for video-on-demand
Shown as byte
fastly.otfp_shield_resp_header_bytes
(gauge)
Total header bytes delivered via a shield for the Fastly On-the-Fly Packager for On Demand Streaming service for video-on-demand
Shown as byte
fastly.otfp_manifests
(gauge)
Number of responses that were manifest files from the Fastly On-the-Fly Packager for On Demand Streaming service for video-on-demand
Shown as response
fastly.otfp_deliver_time
(gauge)
Total amount of time spent delivering a response from the Fastly On-the-Fly Packager for On Demand Streaming service for video-on-demand
Shown as second
fastly.otfp_shield_time
(gauge)
Total amount of time spent delivering a response via a sheild from the Fastly On-the-Fly Packager for On Demand Streaming service for video-on-demand
Shown as second
fastly.waf_logged
(gauge)
Number of requests that triggered a WAF rule and were logged
Shown as request
fastly.waf_blocked
(gauge)
Number of requests that triggered a WAF rule and were blocked
Shown as request
fastly.waf_passed
(gauge)
Number of requests that triggered a WAF rule and were passed
Shown as request
fastly.attack_req_body_bytes
(gauge)
Total body bytes received from requests that triggered a WAF rule
Shown as byte
fastly.attack_req_header_bytes
(gauge)
Total header bytes received from requests that triggered a WAF rule
Shown as byte
fastly.attack_logged_req_body_bytes
(gauge)
Total body bytes received from requests that triggered a WAF rule that was logged
Shown as byte
fastly.attack_logged_req_header_bytes
(gauge)
Total header bytes received from requests that triggered a WAF rule that was logged
Shown as byte
fastly.attack_blocked_req_body_bytes
(gauge)
Total body bytes received from requests that triggered a WAF rule that was blocked
Shown as byte
fastly.attack_blocked_req_header_bytes
(gauge)
Total header bytes received from requests that triggered a WAF rule that was blocked
Shown as byte
fastly.attack_passed_req_body_bytes
(gauge)
Total body bytes received from requests that triggered a WAF rule that was passed
Shown as byte
fastly.attack_passed_req_header_bytes
(gauge)
Total header bytes received from requests that triggered a WAF rule that was passed
Shown as byte
fastly.attack_resp_synth_bytes
(gauge)
Total bytes delivered for requests that triggered a WAF rule and returned a synthetic response
Shown as byte
fastly.imgopto_resp_body_bytes
(gauge)
Total body bytes delivered from the Fastly Image Optimizer service
Shown as byte
fastly.imgopto_resp_header_bytes
(gauge)
Total header bytes delivered from the Fastly Image Optimizer service
Shown as byte
fastly.imgopto_shield_resp_body_bytes
(gauge)
Total body bytes delivered via a shield from the Fastly Image Optimizer service
Shown as byte
fastly.imgopto_shield_resp_header_bytes
(gauge)
Total header bytes delivered via a shield from the Fastly Image Optimizer service
Shown as byte
fastly.origin_cache_fetches
(gauge)
Total number of completed requests made to backends (origins) that returned cacheable content
Shown as request
fastly.compute_requests
(gauge)
Total number of requests that were received for your service by Fastly
Shown as request
fastly.compute_request_time_ms
(gauge)
Total actual amount of time used to process your requests including active CPU time (in milliseconds)
Shown as millisecond
fastly.compute_ram_used
(gauge)
Amount of RAM used for your service by Fastly (in bytes)
Shown as byte
fastly.compute_execution_time_ms
(gauge)
Amount of active CPU time used to process your requests (in milliseconds)
Shown as millisecond
fastly.compute_bereqs
(gauge)
Number of backend requests started
Shown as request
fastly.compute_bereq_errors
(gauge)
Number of backend request errors including timeouts
Shown as request
fastly.compute_resource_limit_exceeded
(gauge)
Number of times a guest exceeded its resource limit, including heap, stack, globals, and code execution timeout
Shown as time
fastly.log_bytes
(gauge)
Total log bytes sent
Shown as byte
fastly.edge_requests
(gauge)
Number of requests sent by end users to Fastly
Shown as request
fastly.edge_resp_header_bytes
(gauge)
Total header bytes delivered from Fastly to the end user
Shown as byte
fastly.edge_resp_body_bytes
(gauge)
Total body bytes delivered from Fastly to the end user
Shown as byte
fastly.edge_hit_requests
(gauge)
Number of requests sent by end users to Fastly that resulted in a hit at the edge
Shown as request
fastly.edge_miss_requests
(gauge)
Number of requests sent by end users to Fastly that resulted in a miss at the edge
Shown as request
fastly.edge_hit_resp_header_bytes
(gauge)
Header bytes delivered for edge hits
Shown as byte
fastly.edge_miss_resp_header_bytes
(gauge)
Header bytes delivered for edge misses
Shown as byte
fastly.edge_hit_resp_body_bytes
(gauge)
Body bytes delivered for edge hits
Shown as byte
fastly.edge_miss_resp_body_bytes
(gauge)
Body bytes delivered for edge misses
Shown as byte
fastly.shield_hit_requests
(gauge)
Number of requests that resulted in a hit at a shield
Shown as request
fastly.shield_miss_requests
(gauge)
Number of requests that resulted in a miss at a shield
Shown as request
fastly.shield_hit_resp_header_bytes
(gauge)
Header bytes delivered for shield hits
Shown as byte
fastly.shield_miss_resp_header_bytes
(gauge)
Header bytes delivered for shield misses
Shown as byte
fastly.shield_hit_resp_body_bytes
(gauge)
Body bytes delivered for shield hits
Shown as byte
fastly.shield_miss_resp_body_bytes
(gauge)
Body bytes delivered for shield misses
Shown as byte
fastly.shield_revalidations
(gauge)
Number of responses received from origin with a 304 status code, in response to an If-Modified-Since or If-None-Match request to a shield. Under regular scenarios, a revalidation implies a cache hit. However, if using segmented caching this may result in a cache miss
Shown as response
fastly.shield_fetches
(gauge)
Number of requests made from one Fastly POP to another, as part of shielding
Shown as request
fastly.shield_fetch_header_bytes
(gauge)
Total request header bytes sent to a shield
Shown as byte
fastly.shield_fetch_body_bytes
(gauge)
Total request body bytes sent to a shield
Shown as byte
fastly.shield_fetch_resp_header_bytes
(gauge)
Total response header bytes sent from a shield to the edge
Shown as byte
fastly.shield_fetch_resp_body_bytes
(gauge)
Total response body bytes sent from a shield to the edge
Shown as byte
fastly.shield_cache_fetches
(gauge)
Total number of completed requests made to shields that returned cacheable content
Shown as request
fastly.origin_cache_fetch_resp_header_bytes
(gauge)
Header bytes received from an origin for cacheable content
Shown as byte
fastly.origin_cache_fetch_resp_body_bytes
(gauge)
Body bytes received from origin for cacheable content
Shown as byte
fastly.origin_revalidations
(gauge)
Number of responses received from origin with a 304 status code in response to an If-Modified-Since or If-None-Match request. Under regular scenarios, a revalidation implies a cache hit. However, if using Fastly Image Optimizer or segmented caching this may result in a cache miss
Shown as response
fastly.origin_fetches
(gauge)
Number of requests sent to origin
Shown as request
fastly.origin_fetch_header_bytes
(gauge)
Total request header bytes sent to origin
Shown as byte
fastly.origin_fetch_body_bytes
(gauge)
Total request body bytes sent to origin
Shown as byte
fastly.origin_fetch_resp_header_bytes
(gauge)
Total header bytes received from origin
Shown as byte
fastly.origin_fetch_resp_body_bytes
(gauge)
Total body bytes received from origin
Shown as byte
fastly.http3
(gauge)
Number of requests received over HTTP/3
Shown as request
fastly.imgvideo
(gauge)
Number of video responses that came from the Fastly Image Optimizer service
Shown as response
fastly.imgvideo_frames
(gauge)
Number of video frames that came from the Fastly Image Optimizer service
Shown as response
fastly.imgvideo_resp_body_bytes
(gauge)
Total body bytes of video delivered from the Fastly Image Optimizer service
Shown as byte
fastly.imgvideo_resp_header_bytes
(gauge)
Total header bytes of video delivered from the Fastly Image Optimizer service
Shown as byte
fastly.imgvideo_shield
(gauge)
Number of video responses delivered via a shield that came from the Fastly Image Optimizer service
Shown as response
fastly.imgvideo_shield_frames
(gauge)
Number of video frames delivered via a shield that came from the Fastly Image Optimizer service
Shown as response
fastly.imgvideo_shield_resp_header_bytes
(gauge)
Total header bytes of video delivered via a shield from the Fastly Image Optimizer service
Shown as byte
fastly.imgvideo_shield_resp_body_bytes
(gauge)
Total body bytes of video delivered via a shield from the Fastly Image Optimizer service
Shown as byte

Events

The Fastly integration does not include any events.

Service Checks

The Fastly integration does not include any service checks.

Troubleshooting

Need help? Contact Datadog support.

Further reading