Learn more about Streama© – the foundational technology behind our stateful streaming data platform. Learn More

Fastly Logs via HTTPS Streaming

Fastly’s Real-Time Log Streaming feature provides the ability to send Fastly logs to any HTTPS endpoint. This will allow you to optimize your Fastly services.

Fastly supports real-time log streaming of data that passes through it. Fastly supports a number of protocols that allow you to stream logs to a variety of locations, including third-party services, for storage and analysis. The following tutorial will cover how to set up your HTTPS endpoint to Coralogix from your Fastly account. For more details, on Log streaming through HTTPS, you can find the official documentation here: https://docs.fastly.com/en/guides/log-streaming-https.

NOTE: The logging endpoint for HTTPS streaming is disabled by default. To enable the endpoint for your account, you will need to contact support@fastly.com to request it.

Setting up Fastly logs Configuration with Coralogix


1 – After logging into your Fastly account, you will see a listing of all configured services. Click on Configure at the top.

coralogix fastly integration, list of all configured services


2 – Choose which service you wish to provision. You can switch between existing services or create a new one. Click on “View active configuration” to set a new endpoint.

coralogix fastly integration choose service to provision


3 – Click on “Clone” to access editing.

coralogix fastly integration clone button


4 – On the left panel, click on “Logging”.

coralogix fastly integration click logging


5 – Click on “Create Endpoint”.

coralogix fastly integration create endpoint


6 – Scroll down the page and choose HTTPS, and click on the associated “Create Endpoint” button.


7 – Next you will configure your endpoint.

coralogix fastly integration endpoint configuration

Here, enter the relevant information for each of the requested fields.

  • Name: Name your endpoint
  • Log format (Recommended): (enter the following data)
      "severity": 3, 
      "json": { 
        "time": { 
        "cdn_server": { 
            "is_cacheable":%{if(fastly_info.state ~"^(HIT|MISS)$", "true", "false")}V,
            "cache_status":"%{regsub(fastly_info.state, "^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*", "\\2\\3")}V",
            "is_h2":%{if(fastly_info.is_h2, "true", "false")}V,
            "is_h2_push":%{if(fastly_info.h2.is_push, "true", "false")}V,
        "client": { 
            "location_geopoint": { 
        "response": { 
        "request": { 
            "is_ipv6":%{if(req.is_ipv6, "true", "false")}V,
        "socket": { 

    The first five fields are mandatory:

    • Timestamp – The format should not change.
    • applicationName – Enter the name of the application.
    • subsystemName – Enter the name of the subsystem. 
    • Severity – Apply the severity to all logs, using the following choices: 1-debug, 2-verbose, 3-info, 4-warning, 5-error, 6-critical. This can be changed later using an extract rule, as described below.
    • JSON (object) – Fields can be added or removed. Static fields can be added.  Nested JSON formats are supported including any fields described in the Fastly VCL reference: https://docs.fastly.com/vcl/variables/.

    The response.status field sends the request status. This is a recommended field. Then, using the Coralogix parsing rules, you may set a JSON extract rule to extract the status code from the request into Coralogix severity. Define the severity to automatically determine the importance of the type of log. Note: in Coralogix we automatically map HTTP status codes into a severity tag as appropriate. For example, status code 200 will set the Coralogix severity as “INFO”, status code 4xx will set Coralogix severity as “ERROR”, etc.

Coralogix rule configuration

This is how the rule will look in Coralogix.

coralogix fastly integration json extract rule

8 – Under advanced options, enter the following data.

coralogix fastly integration advanced options


Set the options as:

Content type – application/json

Custom header name – private_key

Custom header value – YOUR CORALOGIX PRIVATE KEY (your unique private key, which can be found under settings → send your logs, at the top left of the screen)

Method – Choose “POST” (default)

JSON log entry format – Choose “Array of JSON”

Select a log line format – Choose “Blank” (default)

Placement – Choose “Format Version Default” (default)

Leave the rest of the options empty and click on “Create” (or “Update” if you are updating an endpoint). To finish setting up your service, click on the green “Activate” button on the right to activate the new/updated endpoint.

9 – After activation, under “Domains” on the left panel,  click on “Test domain” to verify your configuration. A test log should appear in your Coralogix account.

coralogix fastly integration test domain


10 – This is how it should appear in Coralogix.

coralogix fastly integration log example in coralogix

If you see your test log in Coralogix, it means that you have successfully configured the integration.

To get all the Coralogix dashboards and alerts, contact our support on our website/in-app chat. We reply in under 2 minutes!

Still, have questions? check our website and use the in-app chat for quick help from a Coralogix professional.